首页 > 其他 > 详细

nginx.conf 配置文件新建域名访问

时间:2020-03-26 11:52:13      阅读:109      评论:0      收藏:0      [点我收藏+]
server {
listen 80;
server_name www.huliangqing.com ; //域名地址
charset koi8-r;
access_log logs/huliangqing.log; //这个域名的日志
location / {
root /mnt/www/tplay/public;//共享文件框架的地址
index index.php index.html;//框架的入口文件

if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;//伪静态
break;}

location ~ \.php$ {
root/mnt/www/tplay/public;//也是框架的地址 好像是支持访问php文件
fastcgi_pass 127.0.0.1:9000 ;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

}
}

本地新建域名进行访问

技术分享图片

 

技术分享图片

 

nginx.conf 配置文件新建域名访问

原文:https://www.cnblogs.com/huliangqing/p/12573294.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!