setting up LEMP with ubuntu 12.04, nginx, mysql, php fastcgi


I am trying to set up a LEMP stack on my linode401891 and to run a wordpress site with domain name

I would also like to run an instance of discourse as a subdomain of ( or something like that).

I've been going back and forth with several startup guides. Everything I've set up so far comes from the following guides (using as the domain name): … our-linode"> …"> … e-pangolin">

After more or less completing those guides, I received a 502 bad gateway error, which went away once I removed /etc/nginx/conf.d/discourse.conf. I believe the error may have been because the servername was set to for both that configuration (at root /var/www/discourse/publichtml/) and for a configuration at /etc/nginx/sites-avaiable/ (at root /srv/www/

Now I am trying to set things up just for /srv/www/

No matter what I do, I am still presented with a "Welcome to nginx!" page upon trying to visit or and a php file at /usr/share/nginx/www/info.php downloads instead of displaying on my browser

So I started troubleshooting with the following guides: … -04-lts--3"> … untu-12-04">

Still not getting anywhere. I'll provide additional information, but I'm not sure what information would be most useful.

Thanks for any help.

2 Replies

The contents of your nginx config files and error logs will help.

Did you delete default configuration file in sites-enabled folder?


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct