server {
listen 80 ;
server_name test.com www.test.com;
index index.html index.php index.htm;
root /alidata/www/test/public/; if ( $query_string ~* ".*[\;'\<\>].*" ){
return 404;
} return 404;
} location / {
try_files $uri $uri/ /index.php?$query_string;
} if (!-f $request_filename){
rewrite ^/(.+)$ /index.php?$1& last;
} location ~ .*\.(php|php5)?$
{
if ( $host != 'test.com' ) {
rewrite ^/(.*)$ http://test.com permanent;
} fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log /alidata/log/nginx/access/default.log;
}

  

nginx 配置文件配置的更多相关文章

  1. NGINX 配置文件配置url重写

    1.项目在根目录: location / {            index  index.html index.htm index.php l.php;            autoindex  ...

  2. Nginx配置文件(nginx.conf)配置详解(2)

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

  3. Nginx配置文件(nginx.conf)配置详解

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

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

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

  5. Windows下Nginx的配置及配置文件部分介绍

    一.在官网下载 nginx的Windows版本,官网下载:http://nginx.org/download/ 选择你自己想要的版本下载,解压 nginx(例如nginx-1.6.3) 包到你的win ...

  6. Nginx配置文件具体配置解释

    Nginx配置文件具体配置解释   #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_processes 8; #全局错 ...

  7. Nginx配置文件(nginx.conf)配置具体解释

    欢迎扫码增加Java高知群交流 Nginx的配置文件nginx.conf配置具体解释例如以下:   user nginx nginx ; Nginx用户及组:用户 组. window下不指定   wo ...

  8. Nginx配置文件(nginx.conf)配置详解[转]

    转自:http://blog.csdn.net/tjcyjd/article/details/50695922 重新学习,发觉这篇文章写得很详细就摘录了! Nginx的配置文件nginx.conf配置 ...

  9. nginx配置文件内容详情及基本属性配置

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

随机推荐

  1. 函数,lambda函数,递归函数,内置函数(map,filter),装饰器

    1. 集合 主要作用: 去重 关系测试, 交集\差集\并集\反向(对称)差集 2. 元组 只读列表,只有count, index 2 个方法 作用:如果一些数据不想被人修改, 可以存成元组,比如身份证 ...

  2. 学习笔记之pandas

    Python Data Analysis Library — pandas: Python Data Analysis Library https://pandas.pydata.org/ panda ...

  3. 学习笔记之Git / Gitflow / TortoiseGit

    Git - Wikipedia https://en.wikipedia.org/wiki/Git Git (/ɡɪt/) is a version control system for tracki ...

  4. windows下GitHub的安装、配置以及项目的上传过程详细介绍

    概要 本文主要介绍了在Win10系统中安装Github终端.如何配置安装好的Git终端以及如何利用Git终端将自己的项目上传到远程服务器中 操作必备 win10系统电脑一台.良好的互联网连接.GitH ...

  5. github_地址

    网络请求: hongyangAndroid/okhttputils(包含cookie的管理): 图片之压缩: Sunzxyong/Tiny:(http://www.tuicool.com/articl ...

  6. sas 命令行打开SAS IDE 的代码

    "C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\Program Files\SASHom ...

  7. Unable to find the wrapper ”https” - did youforget to enable it when you configured PHP?

    Unable to find the wrapper ”https” - did youforget to enable it when you configured PHP? 这是在Windows的 ...

  8. Java - 34 Java 文档注释

    Java 文档注释 Java只是三种注释方式.前两种分别是// 和/* */,第三种被称作说明注释,它以/** 开始,以 */结束. 说明注释允许你在程序中嵌入关于程序的信息.你可以使用javadoc ...

  9. 小朋友学C语言(5):常量和变量,for循环

    动手编写程序: #include <stdio.h> int main() { int a = 1; printf("a = %d\n", a); a = 2; pri ...

  10. html跳页面传值

    从a.html跳转到b.html并且把a.html的值name传入b.html  在a.html页面,url路径后面带参数,参数与url之间用?隔开 window.location.href = &q ...