我一直收到 403 Forbidden
的错误提示。
我的设置:
/etc/nginx/sites-available/default
default
server {
listen 80;
root home/laravel-app/;
index index.php index.html index.htm;
server_name example.com;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
# pass the PHP scripts to FastCGI server listening on the php-fpm socket
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;
}
}
更新
我按照这里的说明进行操作。
如果您有任何提示/建议,将会是极大的帮助!
sock
文件可能具有错误的权限,这导致了状态500。要么是这个问题,要么是您的PHP配置中的某些问题。 - tftdchown -R www-data:www-data /home/benu/home/forge/ssc-portal
或者chmod +x /home/benu/home/forge/ssc-portal/index.php
? - Nguyen Sy Thanh Sonerror.log
文件。 - plaes