|
@@ -0,0 +1,61 @@
|
|
|
+server {
|
|
|
+ server_name me.5dev.cn;
|
|
|
+ listen 80;
|
|
|
+
|
|
|
+ autoindex on;
|
|
|
+
|
|
|
+ set $charset utf-8;
|
|
|
+
|
|
|
+ charset $charset;
|
|
|
+
|
|
|
+ set $rootdir /www/jiaoyoucms;
|
|
|
+ root $rootdir;
|
|
|
+ index index.php index.html;
|
|
|
+
|
|
|
+ set $rewrite yes;
|
|
|
+
|
|
|
+ location ~ ^/favicon\.ico$ {
|
|
|
+ root $rootdir;
|
|
|
+ }
|
|
|
+
|
|
|
+ location ~* (.*).tpl {
|
|
|
+ return 404;
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( $request_uri ~* ^/(data\/|public\/|assets\/|static\/|crossdomain\.xml|index\.php|favicon\.ico) ) {
|
|
|
+ set $rewrite no;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if ($rewrite ~* yes) {
|
|
|
+ rewrite ^/(.*) /index.php/$1 last;
|
|
|
+ }
|
|
|
+
|
|
|
+ location ~ /(data\/|public\/|assets\/|static\/|crossdomain\.xml)
|
|
|
+ {
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+ }
|
|
|
+
|
|
|
+ location /doc/ {
|
|
|
+ alias /usr/share/doc/;
|
|
|
+ autoindex on;
|
|
|
+ allow 127.0.0.1;
|
|
|
+ allow ::1;
|
|
|
+ deny all;
|
|
|
+ }
|
|
|
+
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+}
|