laravel - nginx+php7配置虚拟主机无法访问
本文介绍了laravel - nginx+php7配置虚拟主机无法访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
nginx+php7配置虚拟主机无法访问到我的laravel项目,访问页面一直报500错误码
我的配置:
server {
listen 80;
listen [::]:80;
server_name demo.cn;
root /var/www/laravel-blog/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
解决方案
教程很清晰:https://laravist.com/series/d...
这篇关于laravel - nginx+php7配置虚拟主机无法访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文