nginx 配置.conf文件,实现laravel路由
server
{listen 80;
server_name ***.com;
index index.html index.htm index.php;
root /www/laravel/public/;
#error_page 404 /404.html;
include /usr/local/nginx/conf/enable-php.conf;
location /
{
try_files $uri $uri/ /index.php?$query_string;
}
location ^~ /resources/ {
alias /www/laravel/resources/;
}
location /nginx_status
{
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log /www/wwwlogs/laravel.log;
}
上一篇:php调用微信扫一扫
下一篇:php curl设置超时,毫秒级别
肤
选择风格关闭