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

Hello,

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

I would also like to run an instance of discourse as a subdomain of mysite.com (forum.mysite.com 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 mysite.com as the domain name):

https://library.linode.com/getting-star … our-linode">https://library.linode.com/getting-started#sph_provisioning-your-linode

https://library.linode.com/securing-your-server

https://github.com/discourse/discourse/ … -ubuntu.md">https://github.com/discourse/discourse/blob/master/docs/INSTALL-ubuntu.md

https://library.linode.com/lemp-guides/ … e-pangolin">https://library.linode.com/lemp-guides/ubuntu-12.04-precise-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 mysite.com for both that configuration (at root /var/www/discourse/publichtml/) and for a configuration at /etc/nginx/sites-avaiable/mysite.com (at root /srv/www/mysite.com/public_html).

Now I am trying to set things up just for /srv/www/mysite.com/public_html.

No matter what I do, I am still presented with a "Welcome to nginx!" page upon trying to visit mysite.com or mysite.com/importbuddy.php 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:

https://www.digitalocean.com/community/ … -04-lts--3">https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3

https://www.digitalocean.com/community/ … untu-12-04">https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-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?

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct