Skip to content
Advertisement

What is the opposite of mod_wsgi-express start-server

I accidentally closed the terminal after running this command

mod_wsgi-express start-server

And I can’t find the resource on how to stop the server

What is the command?

Advertisement

Answer

The solution I opened terminal and killed the process via the pid

I opened the terminal and ran the following code to get the pid of the process

lsof -i -f

This is a sample response I got

apache2 20000 ebrahim 3u IPv4 1234565 0t0 TCP *:8000 (LISTEN)

apache2 20001 ebrahim 3u IPv4 1234565 0t0 TCP *:8000 (LISTEN)

apache2 20004 ebrahim 3u IPv4 1234565 0t0 TCP *:8000 (LISTEN)

Then I performed the following command to kill it in the form of sudo kill (pid number) for example

sudo kill 20000 

Another way (more proper way) to do this is to go to the to the directory that holds the apachectl file. (the directory changes if you use the --server-root option when using the mod_wsgi-express start server command). You simply have to run the code below from terminal

/etc/mod_wsgi-express-80/apachectl stop
Advertisement