jb5531
By:
jb5531

Upgraded to nginx 1.4.4 from 1.1.9 (and messed with Postfix) - now WordPress site is getting a 403 error

February 8, 2014 4k views
I'm not sure if it was Postfix that caused this or upgrading to a newer nginx. A few bad things happened along the way probably, so I'm not sure if this has had any effect. I had my server working with the updated nginx 1.4.4 but then I started messing with Postfix, changed my droplet name to be mail.domainname.com so that it would work (according to DigitalOcean's tutorials). I also did a apt-get update, apt-get upgrade since my server was telling me i had upgrades and some of them were security upgrades. This installed Apache, which I promptly removed. Anyway, I'm kind of new to this and I don't know why this could be happening. I get my IP address to come up with nginx, ipaddress/info.php causes the info.php file to download to my machine for some reason, and my setup WordPress site is getting a 403 error. I checked that www-data had the permissions for all of the directories - getting close to just starting over with this as it's just a test site I'm working with at this point. Can anyone help?
3 Answers
Do you have a server block in /etc/nginx/sites-enabled/ for your WordPress site?
  • (Pablo unrelated to this answer but was checking out your profile and other answers ( you are quite knowledgable) and noticed that your site you linked to in your profile might be compromised as it is instructing people to download flash and not from an adobe site...)

Hi Pablo - I do have a server block and I just changed it to allow the site to come up, but it's confusing because it's different than what I needed before. Specifically, before I had:
root /usr/share/nginx/www;

and to make it work, almost correctly (wp-admin doesn't seem to work, need to use wp-login.php):
root /var/html/mydomain.com/public_html;

Now, that's a pretty big difference because before I did not need to be specific and the directory resolved automatically to my WordPress install public_html directory. Not exactly sure what's going on.

I also made sure to symlink the sites-available to sites-enabled to make this work.
Can you pastebin your server block?
Have another answer? Share your knowledge.