I started an Ubuntu VPS with LAMP then decided I want to try out LEMP, what's the best way to proceed?

August 2, 2015 1k views
Nginx LAMP Stack Ubuntu

I'm very much a beginner to the web dev environment. I've only played with LAMP (mostly WAMP really) on a local host and never really done much with it.

I work in IT but devs in my office are now using Nginx (MEAN stack) so I can get a bit of support there, or at least a helping hand!

I did get Nginx working but screwed something royally when playing around so rolled back to an old image and i'm bascially on a very simple LAMP install now.

What's the best way to proceed? Remove / Disable Apache and install Nginx, or just install Nginx now? I've got nothing hosted at all.

I'd like to get Jeykll deploying to keep track of what i'm doing.

  • Simple solution is to rebuild your server with a LEMP image from DigitalOcean!

    PS: Backup your data before you proceed :]

  • I did a backup image once I'd done the inital install and ssh keys, etc. were setup.

    I've also rebuilt it last night from the LAMP image cause after some playing around with Ghost a few weeks ago I cannot seem to connect to my web page at all!

    Unfortunately that hasn't resolved the issue and i'm non-the-wiser to what's causing the problem.

    I can connect and ssh fine with no issues but when trying to connect to my IP or hostname from a web browser I get constant timeout errors.

  • Ah, just found my issue. When I was playing with Nginx and Ghost i'd also setup ufw, which was blocking everything.

    Temporarily disabled and it all connects now.

1 Answer

I suggest you to remove the Apache and install new Nginx i think the least version is 1.8.0
remove the Apache by using this command :
sudo apt-get purge apache2*

then you need to install nginx :

sudo apt-get update
sudo apt-get install nginx

then start the service :

sudo service nginx start

now u can access to your web server by typing this in your browser :

  • That's fantastic. I'll give that a go.

    I ended up rebuilding my image last night from scratch out of frustration (and in the end I think it was an issue with my DNS!)

Have another answer? Share your knowledge.