起因是在 Nginx 下打开任何一个 .php 都 403,Laravel 设置 app/storage 为 777 访问 /public 同样 403,于是决定 restore Nginx。
环境
Ubuntu 14.10 Nginx Version: 1.6.2
完全卸载 Nginx
1 | $ sudo apt-get purge nginx nginx-core nginx-common nginx-full |
卸载完成后可以重启下服务器
重装 Nginx
1 | $ sudo apt-get install nginx |
配置 Nginx
1 | $ sudo vim /etc/nginx/sites-avaiable/default |
看到的默认配置如下:
1 | server { |
我们需要做点修改:
1 | server { |
修改完成后,保存文件,重启 Nginx:
1 | $ sudo service nginx restart |
至此问题解决。