移动WordPress的文件到不同的位置后,Nginx的403错误

我有一个使用fastcgi的Rails应用程序内的Wordpress工作。 现在,我正在移动所有东西,以便在/生产中访问它。 我移动了wordpress文件并将nginx位置块从/ wptest更新为/ blog。 但是,我突然得到一个403错误。 我相信我的文件权限是正确的 – drwxrwxr-x所有文件夹和-rw-rw-r–文件。

欣赏任何build议。

这是我的nginxconfiguration:

server { listen 80; server_name [private]; root [private]; index index.html index.htm index.php; try_files $uri/index.html $uri/index.php $uri; if (-f $request_filename) { break; } location / { rails_env production; passenger_enabled on; rails_spawn_method smart; } location /blog { index index.php; try_files $uri $uri/ $uri/index.php; location ~ \.php$ { include /usr/local/bin/nginx/conf/fastcgi_params; fastcgi_index index.php; fastcgi_read_timeout 120; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/tmp/php.socket; } } } 

问题已经解决。 原来nginx没有正确重启,所以对nginxconfiguration文件的修改没有被引入。

运行“sudo stop nginx”,查杀所有徘徊的nginx进程,然后重新启动nginx修复这个问题。