Thanks for a quick and useful response, as always. Disabled it now and 
works well.

On Wednesday, July 19, 2017 at 10:57:09 AM UTC+5:30, Graham Dumpleton wrote:
>
>
> On 19 Jul 2017, at 3:22 PM, Anupam <[email protected] <javascript:>> 
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to