参考了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内容的更多相关文章

  1. Nginx的配置文件(nginx.conf)解析和领读官网

    步骤一:vi nginx.conf配置文件,参考本博文的最下面总结,自行去设置 最后nginx.conf内容为 步骤二:每次修改了nginx.conf配置文件后,都要reload下. index.ht ...

  2. 配置php环境的一个nginx.conf

    文件:nginx.conf 内容: #user  nobody;worker_processes  1; #error_log  logs/error.log;#error_log  logs/err ...

  3. Nginx配置文件nginx.conf(八)

    原文链接:https://www.cnblogs.com/knowledgesea/p/5175711.html 在nginx.conf的注释符号是#. 默认的nginx.conf内容为: #user ...

  4. Nginx 在windows下配合iis搭建负载均衡过程 [转]

    因为项目遇到大量图片存储问题,虽然现在我们图片还不是很多(目前在1T上下,预计增长速度每年1.3倍的增长速度),自己在思考如何有效地存储大量图片时,查找一些资料,看到了,有人使用 Nginx搭建服务器 ...

  5. 【Thinkphp5 】部署nginx时nginx.conf配置文件修改

    背景:thinkphp5项目 服务器环境: lnmp 1 打开路径  /usr/local/nginx/conf/vhost/ 此路径下会有你添加的域名文件夹..找到对应的域名打开. 2  代码如下, ...

  6. windows下Nacos集群搭建与nginx集成

    前言: nacos集群至少需要三个(一般为奇数个)nacos实 例,其前面顶nginx,外界入口从nginx入 一.windows下Nacos集群搭建 将Nacos的解压包复制分成3份,分别是: na ...

  7. Windows中Nginx配置nginx.conf不生效解决方法(路径映射)

    Windows中Nginx配置nginx.conf不生效解决方法 今天在做Nginx项目的时候,要处理一个路径映射问题, location /evaluate/ { proxy_pass http:/ ...

  8. linux下Nginx配置文件(nginx.conf)配置设置详解(windows用phpstudy集成)

    linux备份nginx.conf文件举例: cp /usr/local/nginx/nginx.conf /usr/local/nginx/nginx.conf-20171111(日期) 在进程列表 ...

  9. thinkphp5在Linux下Nginx配置问题解决

    首先tp5的访问目录指向到webroot/public文件夹中. thinkphp的url访问:http://serverName/index.php(或者其它应用入口文件)/模块/控制器/操作/[参 ...

随机推荐

  1. C#获取当前日期时间

    我们可以通过使用DataTime这个类来获取当前的时间.通过调用类中的各种方法我们可以获取不同的时间:如:日期(2008-09-04).时间(12:12:12).日期+时间(2008-09-04 12 ...

  2. 使用LSTM-RNN建立股票预测模型

    硕士毕业之前曾经对基于LSTM循环神经网络的股价预测方法进行过小小的研究,趁着最近工作不忙,把其中的一部分内容写下来做以记录. 此次股票价格预测模型仅根据股票的历史数据来建立,不考虑消息面对个股的影响 ...

  3. 第二章 函数编程&常用标准库

    函数编程&常用标准库                                                                                       ...

  4. Zookeeper原理、安装、基本使用和API

     ZooKeeper ZooKeeper是一种分布式协调服务, 解决应用程序的分布式带来的问题.   1 分布式应用 分布式应用可以在给定时间(同时)在网络中的多个系统上运行,通过协调它们以快速有效的 ...

  5. 掷骰子DApp的实现

    前言:​ DApp前些日子比较火, 这段时间有些低迷. 我也是后知后觉, 现在才接触一些, 这篇博文就当做DApp的初次印象吧.​ 本文要写的是基于智能合约的博彩游戏DApp—骰子游戏, 来看看它是怎 ...

  6. 【linux基础】linux不能进入系统

    博主遇到的这个问题其实主要原因是系统内核和NVIDIA的GPU版本不匹配. 主要是系统内核自动更新,而GPU驱动没有对应的更新造成的. 又要涉及NVIDIA驱动的安装,这个安装真的很鸡肋... 需要注 ...

  7. textview自定义跳转链接

    设置方式 ,主要是遍历html中的url,然后加一个自定义的跳转 private void setTextLink(String rule) { if(TextUtils.isEmpty(rule)) ...

  8. Number.toLocalString() js

    地址链接:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocal ...

  9. until和while 判断网段IP地址是否存在

    1.使用until和while分别实现192.168.0.0/24网段内,地址是否能够ping通,若ping通则输出"success!",若ping不通则输出"fail! ...

  10. 赋值,什么时候用value,什么时候用innerText

    赋值语句: window.document.getElementById('limittime').value='${date}' window.document.getElementById('li ...