nginx Wordpress URL rewrite

坚强是说给别人听的谎言 提交于 2019-12-05 22:40:42

Could be the permission of the root site folder

This is an example that i use to wordpress

server {
listen 80;
server_name www.mysite.com mysite.com;
root /srv/www/mysite.com/public_html;
location / {
    index  index.html index.htm index.php;
    try_files $uri $uri/ /index.php?$args;
}
 rewrite /wp-admin$ $scheme://$host$uri/ permanent;
 include /srv/www/mysite.com/public_html/*.conf;
 location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
    }

}

Did you try restarting nginx after you have saved your config?

Also, check out my nginx/WordPress setup guide here:

http://themesforge.com/featured/high-performance-wordpress-part-3/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!