I've installed Nginx using apt-get install nginx
but now I need to add SPDY and PageSpeed extensions. This is why I need to remove the current Nginx installation and install the new one from source.
How should I proceed? Do I have to uninstall the current Nginx and then compile the new one to avoid complications between those two?
How do I register the custom Nginx as a service so I can use service nginx start
and make it start on boot?
To create the service nginx start
touch /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx
That should allow you to run Service nginx start Other service options
start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest
You should remove the existing nginx
Try the following commands
(assuming that you are root)
And that should do the trick.
instead of and for . It is more convenient compared to the "traditional" mode.For compiling from the source, just grab the source from
http://nginx.org/en/download.html
For services, I would recommend on using
I think you should find this article quite useful.
For further references, you can just run
apt-get remove <package>
oraptitude remove <package>
to uninstall any package but it won't hurt to look for leftovers on the usual places - namely/etc/
- given that you edit those files and apt/aptitude may be reluctant to remove -- unless you specify the proper flags.Remember, Google is your friend.