Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

iwebshop rewrite rules

[复制链接]
梁国平 发表于 2014-3-8 05:41:46 | 显示全部楼层 |阅读模式
本帖最后由 梁国平 于 2014-3-8 05:46 编辑
  1. # The default server
  2. #
  3. server {
  4.     listen       80;
  5.     server_name  _;

  6.     #charset koi8-r;

  7.     #access_log  logs/host.access.log  main;

  8.     location / {
  9.         root   /usr/share/nginx/html;
  10.         index  index.php index.html index.htm;
  11.         # example
  12.         #ModSecurityEnabled on;
  13.         #ModSecurityConfig /etc/nginx/modsecurity.conf;
  14.     }

  15.     error_page  404              /404.html;
  16.     location = /404.html {
  17.         root  /usr/share/nginx/html;
  18.     }

  19.     # redirect server error pages to the static page /50x.html
  20.     #
  21.     error_page   500 502 503 504  /50x.html;
  22.     location = /50x.html {
  23.         root   /usr/share/nginx/html;
  24.     }

  25.     # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  26.     #
  27.     #location ~ \.php$ {
  28.     #    proxy_pass   http://127.0.0.1;
  29.     #}

  30.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  31.     #
  32.     location ~* \.(php[3-9]?|phtm[l]?)(\/.*)*[        DISCUZ_CODE_0        ]lt;/p><p>          {      </p><p>                root           /usr/share/nginx/html;        
  33.                 fastcgi_pass 127.0.0.1:9000;
  34.                 fastcgi_index index.php;
  35.                 include fastcgi_params;
  36.                 set $path_info "";
  37.                 set $real_script_name $fastcgi_script_name;
  38.                 if
  39.                 ($fastcgi_script_name ~ "^(.+?\.php)(/.+)[        DISCUZ_CODE_0        ]quot;)
  40.                 {
  41.                 set $real_script_name $1;
  42.                 set $path_info $2;
  43.                 }
  44.                 fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html$fastcgi_script_name;
  45.                 fastcgi_param SCRIPT_NAME $real_script_name;
  46.                 fastcgi_param PATH_INFO $path_info;</p><p>        }
  47.     if
  48.     (!-e $request_filename)
  49.         {
  50.          rewrite ^/(?!index\.php|robots\.txt|views|plugins|backup|upload|image|runtime|install)(.*)$ /index.php/$1 last;
  51.          break;
  52.         }

  53.     # deny access to .htaccess files, if Apache's document root
  54.     # concurs with nginx's one
  55.     #
  56.     #location ~ /\.ht {
  57.     #    deny  all;
  58.     #}
  59. }
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-3 01:44 , Processed in 0.114793 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表