server
{
listen 80;
#listen [::]:80;
server_name www.l.com l.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.l.com/laravel/public;
include other.conf;
#error_page 404 /404.html;
include enable-php.conf;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log /home/wwwlogs/www.l.com_access.log;
error_log /home/wwwlogs/www.l.com_error.log;
}我的laravel nginx配置
最新推荐文章于 2023-07-22 10:19:20 发布
本文详细介绍了Nginx服务器的配置方法,包括监听端口、域名设置、索引文件、静态资源缓存策略等关键配置项,并展示了如何通过Nginx实现优雅的路由转发。
1443

被折叠的 条评论
为什么被折叠?



