I have a centos 5 box with apache running fine and listening to port 80.
I’d like to try nginx on let’s say port 5080 (or maybe there is a better
port), without disturbing my apache setup.
(1) If I compile nginx from source and do nothing, will my apache setup
be disturbed?
(2) I am thinking that all the work to make sure nginx listens to port
5080 is to be done in the nginx.conf file; is that right?
If you don’t run it as a superuser, Nginx cannot listen on port 80 and
therefore not intervene with your Apache. Also, compiling and running as
superuser while Nginx is configured to listen at port 80 will not
intervene with Apache as long as Apache was already running, only one
process can claim a port at the same time.
Â
I suggest you compile from source, deploy the binary and configurations
and configure Nginx to run at port 8080, which many people do. Can’t be
a problem.
Â
Cheers,
Â
-----Original message-----
From: JCR [email protected]
Sent: Wed 26-05-2010 19:27
To: [email protected];
Subject: nginx apache and port
Hello,
I have a centos 5 box with apache running fine and listening to port 80.
I’d like to try nginx on let’s say port 5080 (or maybe there is a better
port), without disturbing my apache setup.
(1) If I compile nginx from source and do nothing, will my apache setup
be disturbed?
(2) I am thinking that all the work to make sure nginx listens to port
5080 is to be done in the nginx.conf  file; is that right?
What you suggested actually kills the server then starts it. It would
be wiser to just reload the config file on the fly, without any
downtime, by sending it signal 15:
kill -HUP cat /var/run/nginx.pid
This is on Debian GNU/Linux, YM[and pid location]MV.
–
() ascii-rubanda kampajno - kontraÅ html-a retpoÅto
/\ ascii ribbon campaign - against html e-mail
Thank you very much for your answer. I have both apache and nginx
running at the same time with no disturbance. Excellent!
One thing I am still very confused about is how changes to the
configuration file are captured. With apache, I do an apachectl -k
graceful. Here from what I have read I should:
Â
-----Original message-----
From: JCR [email protected]
Sent: Wed 26-05-2010 21:17
To: [email protected];
Subject: Re: nginx apache and port
Hello,
Thank you very much for your answer. I have both apache and nginx
running at the same time with no disturbance. Excellent!
One thing I am still very confused about is how changes to the
configuration file are captured. With apache, I do an apachectl -k
graceful. Here from what I have read I should: