123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- server {
- server_name me.5dev.cn;
- listen 80;
-
- autoindex on;
- set $charset utf-8;
- charset $charset;
- set $rootdir /www/jiaoyoucms/public;
- root $rootdir;
- index index.php index.html;
- set $rewrite yes;
- location ~ ^/favicon\.ico$ {
- root $rootdir;
- }
-
- location ~* (.*).tpl {
- return 404;
- }
- if ( $request_uri ~* ^/(doc\/|public\/|upload\/|assets\/|static\/|crossdomain\.xml|index\.php|favicon\.ico) ) {
- set $rewrite no;
- }
- if ($rewrite ~* yes) {
- rewrite ^/(.*) /index.php/$1 last;
- }
- location ~ /(doc\/|upload\/|public\/|assets\/|static\/|crossdomain\.xml)
- {
- try_files $uri $uri/ /index.html;
- }
- location /doc/ {
- try_files $uri $uri/ /index.html;
- }
- location ~ ^(.*)$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- # With php-cgi alone:
- fastcgi_pass web-php7:9000;
- #fastcgi_pass onepage-php5:9000;
- # With php-fpm:
- #fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $rootdir/index.php;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- include fastcgi_params;
- }
- }
|