So, I’m setting up a wordpress site on Digital Ocean’s IaaS. I’m using nginx as a proxy and web server (instead of apache), so a LEMP stack. I was able to get my site up and running, though there are a couple of issues. First let me explain my setup more.

Setup

I have nginx set up to redirect a subdomain to a specific directory /usr/share/nginx/www. A request with no subdomain will proxy to a Node.js app listening on port 8000.

Under the usr/share/nginx/www directory I have:

  • 50x.html
  • index.html
  • info.php
  • wordpress/

Under the wordpress directory I have installed wordpress. So, I access my wordpress site through http://subdomain.mydomain.com/wordpress.

I am using php5-fpm and mysql-server installed using apt-get, on a Debian 7 VPS machine.

It works, and I’m able to view my wordpress site. However, here are the issues I’m having:

Permalinks Settings

Permalinks don’t work when I set it to the Post Name structure. When I access, /wordpress/some-page I get the /usr/share/nginx/www/index.html file sent to me.

Editing Images

I cannot edit an image in the Media admin panel. When I go to edit an image, I get a broken image in the editor. I also get a message in my browser’s JS console saying: Resource interpreted as Image but transferred with MIME type text/html: "http://subdomain.mydomain.me/wordpress/wp-admin/admin-ajax.php?action=imgedit-preview&_ajax_nonce=b25651da4f&postid=117&rand=34418".

Final Notes

There may be more issues that I’ll run into, because I just set this site up.

I’m assuming all my issues involve some kind of configuration with either, WordPress, PHP, or nginx.

Read more here: How do I fix permalink and media library issues on a LEMP stack?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: