Start nginx on bootup when compiled from source on Ubuntu - apache

On my Ubuntu 13.10 webserver, I installed nginx from source as I read a guide on how to do this in order to run both nginx (for my Rails apps) and Apache2 (for my php apps). I have nginx running as a proxy for apache2 on these php web apps. I installed nginx from source in to /opt/nginx, but I also have the Ubuntu default (using app-get) installed, although it isn't running.
Upon reboot, the Ubuntu default nginx starts up, so I need to manually "service nginx stop", then start the source compiled nginx using /opt/nginx/sbin/nginx.
How can I disable the Ubuntu default nginx from starting on bootup and instead have my source compiled nginx start?

Try going to /etc/init.d/ and modify the path in nginx.

Related

Gitlab-ee external url is not working

I installed gitlab-ee on my ubuntu 16.04 server hosted with AWS. I am not able to launch gitlab using the external url that is mentioned in gitlab.rb file. I have apache as default webserver. I used a subdomain as external url. But when i launch that url, it is still landing on default apache page and not using nginx to launch gitlab. How to solve this issue?
Apache and Nginx will probably try to use the same ports (80 & 443). The first started, in your case Apache, will start normally, but the second will not initialize properly as two programs can not listen together on the same ports.
Confirm with the command sudo gitlab-ctl status nginx. This will return the status of the integrated nginx instance.
If it is stopped, stop apache and then start nginx using sudo gitlab-ctl start nginx.

gitlab not working after installing nagios and apache but still both nginx and gitlab are running

I installed nagios and apache using https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-ubuntu-14-04
OS: Ubuntu
But after that, gitlab(using nginx) that is already installed in my server stopped working. But another website that is using the same nginx is working.
Stopped means, nginx and gitlab processes are running(I guess) but site is not opening, saying "502 Bad Gateway".
Note that I stopped services nagios and apache2 but still.

Apache passenger configuration for my rails3 application

I have followed these steps to configure passenger (3.0.11) on latest apache httpd server.
gem install passenger
passenger-install-apache2-module
I have a virtual host configuration which points to my rails3 app internally and I have started the apache http server. I am able to access the app with the port configured in httpd.conf. The /etc/init.d/httpd script is used to start/stop the apache httpd server. Do I need to start the passenger server separately or the existing configuration is fine (I am assuming since that we are using the passenger plugin for apache, we don't need to start the passenger server)
Passenger is a module for Apache. As long as you have followed the instructions and included Passenger in the Apache configs it will be started/stopped as a part of apache.

Are there any issues when installing apache tomcat with apache webserver already installed under Windows 7?

I am currently trying to install apache tomcat for running on localhost as I am planning to run a new development project using Java.
Will this be a problem if I have already apache webserver installed locally on my machine already? In other words, will there be any port conflicts or anything other issues with the two servers running on the same machine?
No. Because Tomcat uses default port 8080 for the webserver while the "normal" webserver uses port 80 for html displaying. You can change that in the catalina properties of the tomcat server but on first install the defaults are not causing problems with a port 80 webserver.

Passenger with apache and nginx on the same development box

I've got Apache and passenger on my notebook. I want to test Nginx and passenger on the same machine. I can install Nginx on 8080 and apache on 80. But can I install passenger with both the same server on the same machine?
Yes, simply install the apache module and then the nginx module. You'll probably need to make sure each server has a different PassengerTempDir setting too.
I had both Apache and Nginx with passenger installed and working fine on the same Arch Linux machine, serving a Rails app. Once, with apache running and listening on port 80, I started nginx listening on the same port and got an (expected) error about the port being already bound. I stopped apache and nginx, restarted nginx and started getting Bad Gateway errors whenever I tried to access the Rails app under Nginx. I still haven't figured out what the problems is and how to fix it. Rebooting doesn't seem to help.