Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Jun 16, 2014 11:19 am 
Offline
Junior Member

Joined: Fri Apr 26, 2013 3:58 am
Posts: 23
I am at present using LAMP stack in Linode and running 2 websites. I want to use Nginx server instead of Apache. Do I need to buy a new linode account and setup server from the very beginning. Or is there any shortcut method to achieve this?

What is the best possible way for such conversion from LAMP to LEMP?


Top
   
PostPosted: Mon Jun 16, 2014 7:10 pm 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
The best possible way? It all depends on your distro, your control panel software, etc.

You can:
- install Nginx from the command line.
- configure Nginx to use a port other than port 80 (a temporary measure).
- set up your vhost files for your websites using Nginx
- test your websites using the Nginx port.

Once you're confident that everything is working as desired you can:
- stop the Nginx service.
- change the Nginx configuration to use port 80.
- stop the Apache service (and make sure it doesn't automatically restart when your Linode reboots).
- start the Nginx service (and make sure it automatically starts when your Linode reboots).


Top
   
PostPosted: Tue Jun 17, 2014 3:08 am 
Offline
Junior Member

Joined: Fri Apr 26, 2013 3:58 am
Posts: 23
Thanks Main Street James.
Main Street James wrote:
The best possible way? It all depends on your distro, your control panel software, etc.


2GB unmanaged linode vps account here. Hosted two websites in LAMP environment following this guide: https://library.linode.com/hosting-website

So, it appears that I can safely jump towards the conversion from LAMPP to LEMP. All I need is to follow: https://library.linode.com/lemp-guides/ ... e-pangolin

and after successful working of sites in Nginx, I can uninstall Apache.

What additional step I have to take to make sure apache doesn't automatically restart when Linode reboots?

Regards


Top
   
PostPosted: Tue Jun 17, 2014 4:41 am 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
aicbal, if you are going to uninstall Apache then you don't need to do anything else to make sure it doesn't run ever again. If you want to stop Apache from running automatically but aren't going to uninstall it, here's what you can do:

For Debain based distros (eg, Ubuntu, Linux Mint, etc):
Code:
update-rc.d -f apache2 remove


For Red Hat based distros (eg, Fedora, CentOS, etc):
Code:
# chkconfig httpd off
# chkconfig httpd --del


Top
   
PostPosted: Tue Jun 17, 2014 12:13 pm 
Offline
Junior Member

Joined: Fri Apr 26, 2013 3:58 am
Posts: 23
Thanks Main Street James for your reply.

Please confirm whether the following steps are OK if I like to shift into LEMP environment completely.

1. Uninstall Apache using command: apt-get --purge remove apache2.
2. Install Nginx using command: apt-get install nginx.
3. Configure Nginx virtual hosting to use port 80.
4. Install PHP-FPM using command: apt-get install php5-fpm.
5. Configure PHP.
6. No need to configure MySQL as it is already installed and configured.

Do you agree with the above steps?
If it is alright, then, I shall try it tomorrow.


Top
   
PostPosted: Tue Jun 17, 2014 6:30 pm 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
aicbal, just in case you run into a problem I would not uninstall Apache until you are absolutely sure that Nginx is working properly. But you may do as you wish.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group