Set up nginx in server pilot

April 12, 2018 301 views
Apache Nginx Ubuntu 16.04

Does any one know how to run Wordpress site using only Nginx wihtout apache in server pilot? I tried following the tutorial given in https://serverpilot.io/community/articles/how-to-create-a-lemp-stack-only-nginx-no-apache.html and everything seems to be fine but I cant access my site.

Thank you.

4 Answers

Can you clarify what happens when you attempt to access your site?

One thing to note is that WordPress makes heavy use of rewrites in order to support easy to read URLs. On Apache this is done via .htaccess files and you only need to ensure that Apache is set to use them. On Nginx you need to manually configure your rewrite definitions in your configuration file.

We also offer a LEMP one-click image which comes with the stack all installed and ready to go. To use it with WordPress (for a new site) you would only need to:

  1. use the mysql command with the MySQL root password shown the in message when you log in to create a new database create database mywpsite

  2. Download WordPress and place the files in /var/www/html (make sure to remove the index.html file that is there)

  3. Using the Nginx link above set up your rewrites

  4. Restart nginx so the changes that effect sudo service nginx restart

  5. Navigate to your site in a browser and complete the setup.

Dudy
m trying to lots of time but not run Nginx in my website so First all thanks I copy paste your code and run my problem is solved in my all sites so thanks a lot very kind work
JobOlx (Free Job Portal)
Lok Sabha Election 2019
News BC (Sports News Portal)
Marrycaste (Free MatriMony Portal)

thanks a ton! just copy pasted your code and guess wat? it's worked for StudyCrab

Have another answer? Share your knowledge.