12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- server {
- server_name me.5dev.cn;
- listen 80;
-
- autoindex on;
- set $charset utf-8;
- charset $charset;
- set $rootdir /www/jy/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 ~ ^(.*)$ {
- #add_header Access-Control-Allow-Origin http://192.168.0.109:8080;
- #add_header Access-Control-Allow-Headers X-Requested-With;
- # add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
- #add_header Access-Control-Allow-Credentials true;
- 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;
- }
- }
|