windows下面配合thinkphp5.1.7的nginx.conf内容
参考了https://blog.csdn.net/yangjiale521/article/details/77623514 感谢该作者
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
set $root D:/PHPEnvironment/wwwroot/zdhc/public;
location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
root $root;
}
root $root;
index index.php index.html index.htm;
location @rewrite {
rewrite ^(.*)$ index.php/$1 last;
}
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
#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 html;
}
# 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 {
root $root;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $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;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
#
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
#
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
#
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
#
# location / {
# root "D:/PHPEnvironment/wwwroot";
# index index.html index.htm index.php;
# }
#}
}
windows下面配合thinkphp5.1.7的nginx.conf内容的更多相关文章
- Nginx的配置文件(nginx.conf)解析和领读官网
步骤一:vi nginx.conf配置文件,参考本博文的最下面总结,自行去设置 最后nginx.conf内容为 步骤二:每次修改了nginx.conf配置文件后,都要reload下. index.ht ...
- 配置php环境的一个nginx.conf
文件:nginx.conf 内容: #user nobody;worker_processes 1; #error_log logs/error.log;#error_log logs/err ...
- Nginx配置文件nginx.conf(八)
原文链接:https://www.cnblogs.com/knowledgesea/p/5175711.html 在nginx.conf的注释符号是#. 默认的nginx.conf内容为: #user ...
- Nginx 在windows下配合iis搭建负载均衡过程 [转]
因为项目遇到大量图片存储问题,虽然现在我们图片还不是很多(目前在1T上下,预计增长速度每年1.3倍的增长速度),自己在思考如何有效地存储大量图片时,查找一些资料,看到了,有人使用 Nginx搭建服务器 ...
- 【Thinkphp5 】部署nginx时nginx.conf配置文件修改
背景:thinkphp5项目 服务器环境: lnmp 1 打开路径 /usr/local/nginx/conf/vhost/ 此路径下会有你添加的域名文件夹..找到对应的域名打开. 2 代码如下, ...
- windows下Nacos集群搭建与nginx集成
前言: nacos集群至少需要三个(一般为奇数个)nacos实 例,其前面顶nginx,外界入口从nginx入 一.windows下Nacos集群搭建 将Nacos的解压包复制分成3份,分别是: na ...
- Windows中Nginx配置nginx.conf不生效解决方法(路径映射)
Windows中Nginx配置nginx.conf不生效解决方法 今天在做Nginx项目的时候,要处理一个路径映射问题, location /evaluate/ { proxy_pass http:/ ...
- linux下Nginx配置文件(nginx.conf)配置设置详解(windows用phpstudy集成)
linux备份nginx.conf文件举例: cp /usr/local/nginx/nginx.conf /usr/local/nginx/nginx.conf-20171111(日期) 在进程列表 ...
- thinkphp5在Linux下Nginx配置问题解决
首先tp5的访问目录指向到webroot/public文件夹中. thinkphp的url访问:http://serverName/index.php(或者其它应用入口文件)/模块/控制器/操作/[参 ...
随机推荐
- SpringBoot+POI报表批量导出
由于servletResponse 获取的输出流对象在一次请求中只能输出一次,所以要想实现批量导出报表,需要将excel文件打包成zip格式然后输出. 好了,废话不多说,上代码. 1. 首先,需要导入 ...
- iOS Property 关键字的使用
atomic和nonatomic用来决定编译器生成的getter和setter是否为原子操作. atomic 设置成员变量的@property属性时,默认为atomic,提供多线程安全 ...
- HD ACM 水题顺序
原文传送门:http://acm.hdu.edu.cn/ 第一阶段:开始入门吧!(15天,53题) 一.输入输出练习(2天,10题) 1000.1089-1096.1001 二.简单操作:(2-4天, ...
- JavaSE-类
一.基础概念:计算机语言的发展是接近人的思维方式演变:汇编语言(面向机器).C语言(面向过程).java(面向对象) 二.成员变量和局部变量: 1.全名定义一个类: Package 包名: Class ...
- ECDSA host key for 192.168.0.101 has changed and you have requested strict checking.
原文地址:http://blog.csdn.net/ausboyue/article/details/52775281 Linux SSH命令错误:ECDSA host key "ip地址& ...
- 在Vuex使用 以及 dispatch和commit来调用mutations的区别
main.js中 import Vuex from 'vuex' Vue.use(vuex); const store = new Vuex.store({ state: { nickName: &q ...
- 安利一个十分实用的IDEA插件--RestfulToolkit
官网链接:http://plugins.jetbrains.com/plugin/10292-restfultoolkit,英汉双语的帮助文档. 一套 RESTful 服务开发辅助工具集. 1.根据 ...
- Python练习一
#给一个字符串,统计其中的数字.字母和其他类型字符的个数r=raw_input("请输入一个字符串:")num=0str=0oth=0for i in r: if (i.isdig ...
- SQL-函数-014
SQL中函数的种类: 聚合函数.数学函数.字符串函数.时间函数.元数据函数 聚合函数: sum():求和函数 select SUM(Admin.age) as Age from Admin max() ...
- xxxx征集系统项目目标文档
分组:每四人一组 主题:xxx征集系统 成果: 讨论结束后,每组提交一份课堂讨论记录(电子版发表到博客上,纸质版小组成员签名,下节课提交). 每人根据课堂讨论结果提交一份系统利益相关者描述案例.撰写项 ...