nginx 配置 server
server{
listen 80;
server_name test.eoews.cn;
#项目文件的路径
root "D:/developer/study/PHPTutorial/WWW/project/eoews";
#默认寻找打开文件
location / {
#默认打开的文件
index index.html index.htm index.php l.php;
#打开目录浏览功能
autoindex off;
#重写机制
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
#将服务器错误重定向到指定的静态页面中
error_page 500 502 503 504 D:/developer/study/PHPTutorial/nginx/html/50x.html; location = /50x.html {
root D:/developer/study/PHPTutorial/nginx/html;
} location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
nginx 配置 server的更多相关文章
- thinkphp nginx配置
安装和配置: http://www.cnblogs.com/Bonker/p/4252588.html spawn-fcgi 要先安装和启动:(已过时) sudo spawn-fcgi -a -u ...
- thinkphp的nginx配置
thinkphp的nginx配置 server { listen 80; server_name www.abc.com; #charset utf-8; access_log /var/www/ww ...
- Nginx配置域名转发实例
域名:cps.45wan.com 所在阿里云主机:123.35.9.12 45wan没有在阿里云备案 67wan已经在阿里云备案 阿里云主机(假如123.35.9.12)上原来的nginx配置: ...
- Nginx配置http跳转https访问
Nginx强制http跳转https访问有以下几个方法 nginx的rewrite方法 可以把所有的HTTP请求通过rewrite重写到HTTPS上 配置 方法一 server{ listen ; s ...
- 用rewrite把旧域名直接跳转到新域名的nginx配置
用rewrite把旧域名直接跳转到新域名的nginx配置 把下面代码保存到daziran.com.conf 放在nginx配置目录下 /etc/nginx/conf.d/ #把旧域名zdz8207直接 ...
- nginx配置二级域名
我在我的服务器上面跑了两个node应用程序,分别一个端口2368跑的是ghost博客,一个端口8000跑的是我的demo程序.想要一级域名zhangruojun.com用来访问博客,二级域名demo. ...
- django wsgi nginx 配置
""" WSGI config for HelloWorld project. It exposes the WSGI callable as a module-leve ...
- Nginx配置https双向认证
1. 前期的准备工作: 安装openssl和nginx的https模块 cd ~/ mkdir ssl cd ssl mkdir demoCA cd demoCA mkdir newcert ...
- Nginx配置Web项目(多页面应用,单页面应用)
目前前端项目 可分两种: 多页面应用,单页面应用. 单页面应用 入口是一个html文件,页面路由由js控制,动态往html页面插入DOM. 多页面应用 是由多个html文件组成,浏览器访问的是对应服务 ...
随机推荐
- c++的explicit理解
默认规定 只有一个参数的构造函数也定义了一个隐式转换,将该构造函数对应数据类型的数据转换为该类对象 explicit class A { explicit A(int n); A(char *p); ...
- Nginx类
nginx常见错误页面有哪些?对于其解决方法是什么? 404 bad request 请求失败,请求所希望得到的资源未被在服务器上发现.没有信息能够告诉用户这个状况到底是暂时的还是永久的.假如服务器知 ...
- 习题6-2 使用函数求特殊a串数列和
#include <stdio.h> int fn(int a, int n); int SumA(int a, int n); int main() { int a, n; scanf_ ...
- CMakeLists.txt编写常用命令
目录 1. 设置cmake最小版本 2. 设置项目名称 3. 设置编译目标类型 4. 指定编译包含的源文件 1. 明确指明包含的源文件 2. 搜索指定目录的所有的cpp文件 3. 自定义搜索规则 4. ...
- 201871010118-唐敬博 《面向对象程序设计(java)》第十五周学习总结
博文正文开头格式:(2分) 项目 内容 这个作业属于哪个课程 <https://www.cnblogs.com/nwnu-daizh/> 这个作业的要求在哪里 <https://ww ...
- Tools分类随笔链接整理贴(不定期更新)
1.编程开发工具 Vs2012安装介绍 https://www.cnblogs.com/fzxiaoyi/p/12041854.html Vs2012帮助文档安装介绍 https://www.c ...
- nginx geoip_module 地域信息读取
1.安装geoip yum -y install nginx-module-geoip 2.安装完成后在cd /etc/nginx/modules/ 能看到安装的模块 # cd /etc/nginx/ ...
- 20180706模拟赛T3——神经衰弱
文件名: card 题目类型: 传统题 时间限制: 1秒 内存限制: 128MB 编译优化: 无 题目描述 天然少女小雪非常喜欢玩一个叫做神经衰弱的游戏. 游戏规则是,有若干种牌,每种牌有若干对,开始 ...
- 深度学习accuracy
accuracy=(1+3)/(1+2+3+4),即在所有样本(例子)中做出正确预测的的比例,或者说正确预测的样本数占总预测样本数的比值. precision=(1)/(1+2),指的是正确预测的正样 ...
- pycharm访问mysql数据库
不需要像eclipse那样添加驱动包,在pycharm里面下载一个pymysql包即可. 然后链接自己电脑的mysql并进行访问即可. 源码如下(参考博客:https://blog.csdn.net/ ...