Passenger with apache and nginx on the same development box - apache

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.

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.

Start nginx on bootup when compiled from source on Ubuntu

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.

socket.io with Apache Tomcat

I am using node.js server and implemented socket.io.
It works fine, but for some reason, I have to use Apache Tomcat, running on port 8080, and the node server running on 8081.
If I run the application via :8081 (serving pages through node.js), socket.io (socket.io is listening to 8081 port) is working, but when I serve through Apache Tomcat running application via :8080/Demo_Pro/index.html, socket.io is not working.
Can anybody explain how to run both Apache Tomcat and node.js at the same time.
You should look on google on how to host node.js and apache at the same time. You'll find that you'll have to use mod_proxy to proxy requests through apache. (node.js needs to be on another port). Look at this link: how to put nodejs and apache in the same port 80. It'll give you an idea on how to do it.

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.