> On 19 Jul 2017, at 3:22 PM, Anupam <anupamj...@gmail.com> wrote:
> 
> I am using mod_wsgi-express (on port 8000) behind Nginx (port 80). 
> 
> Everything ran fine but today I saw Nginx couldnt start up because Apache 
> started up and occupied port 80. I remembered I never asked Apache not to do 
> that (but wonder why this never occurred earlier because I have restarted the 
> VM many times in the past). 

Purely luck probably. The nginx server was probably quicker to start in most 
cases and got port 80 first. The Apache instance wouldn't be able to get it and 
would have gone into an error state.

> My question is what's the best way to tell Apache not to start up at all? I 
> think just changing the listening port is not a good idea because I wont be 
> using that server anyways (since mod_wsgi-express is its own separate 
> instance of Apache, as I now understand it). Also I guess doing something 
> like sudo systemctl disable apache2 may not work since mod_wsgi-express needs 
> Apache?. Another option I read in the forums is sudo update-rc.d apache2 
> remove.

Running:

    sudo systemctl disable apache2 

should be fine and enough to stop it running.

When using mod_wsgi-express you aren't relying on the existing Apache instance 
for the system to be running, only that the Apache packages are installed. That 
is, is uses the same Apache binary, include files, libraries and modules, but 
not the same Apache configuration. So unless you use the system Apache for some 
other reason, you should disable it in systemd so it doesn't start. Just do not 
uninstall the Apache using apt-get.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to