Last active
December 5, 2016 05:24
-
-
Save nrshrivatsan/4a1c288801a00e173bd9 to your computer and use it in GitHub Desktop.
Ubuntu Kill nginx + Start Apache 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ubuntu 14.01 comes with nginx I guess.For simple testing purposes I use apache2. | |
######################################################## | |
# Assumption | |
# - nginx & apache2 have already been installed on ubuntu 14.04 | |
# Goal | |
# - Kill nginx and start apache2 | |
############################################################################################################# | |
# The following single line command does the following | |
#============================================================================================================ | |
sudo nginx -s stop | ps -ef | grep nginx | awk {'print $2'} | xargs sudo kill -9 | sudo service apache2 start | |
#============================================================================================================ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment