laravel在站点的二级目录下,访问报500错误

最近刚接触laravel,项目放在了网站的二级目录,配置了二级域名,访问时报500错误。当项目放在网站根目录时,用一级域名可以正常访问。
ngix配置文件:chat.abc.cc.conf 如下

server {
        listen       80;
        root /www/web/abc/public_html/chat;
        server_name chat.abc.cc;
        index  index.html index.php index.htm;
        error_page  400 /errpage/400.html;
        error_page  403 /errpage/403.html;
        error_page  404 /errpage/404.html;
        error_page  405 /errpage/405.html;
        error_page  503 /errpage/503.html;
        location ~ \.php$ {
                proxy_pass http://127.0.0.1:88;
                include naproxy.conf;
        }
        location ~ /\.ht {
                deny  all;
        }
        location / {
                try_files $uri @apache;
        }
        location @apache {
                 internal;
                 proxy_pass http://127.0.0.1:88;
                 include naproxy.conf;
        }
}
宝慕林4294392
浏览 1204回答 3
3回答

哔哔one

500是内部服务错误,请看看你的配置有没有正确,也可看下日志文件

慕田峪9158850

要把laravel的请求重定向到public/index.php里的try_files $uri $uri/ /index.php$is_args$query_string;root指向的也应该是public目录
打开App,查看更多内容
随时随地看视频慕课网APP