最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Laravel Nginx配置步骤详解
时间:2022-06-24 17:49:07 编辑:袖梨 来源:一聚教程网
这是一个Laravel框架运行nginx服务器的配置示例,Laravel框架版本5.2
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html/tanteng.me/public;
index index.php index.html index.htm;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html/tanteng.me/public;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ .php$ {
# proxy_pass http://127.***0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /.ht {
deny all;
}
}
运行在CentOS 7环境,Nginx版本1.8
相关文章
- 超星学生登录入口-超星学习通一键登录 01-30
- 赛氪大英赛报名入口-赛氪竞赛官网首页速点 01-30
- 抖币充值官网入口-抖音抖币充值官网直通 01-30
- j站(Jable)网页版登录入口地址-j站(Jable)海外版国际站网页登录入口地址 01-30
- 奇漫屋在线看漫画:海量国漫日漫全库,每日准时连载更新 01-30
- 无广告漫画app排行榜2026-免费无广告漫画app推荐 01-30