|
@@ -0,0 +1,53 @@
|
|
|
+server {
|
|
|
+ listen 9600;
|
|
|
+ access_log /data/logs/nginx/api/access.log;
|
|
|
+ error_log /data/logs/nginx/api/error.log;
|
|
|
+ index index.html index.php;
|
|
|
+ root /data/gitcode/yuanchengpasc/public/;
|
|
|
+
|
|
|
+ #add_header Access-Control-Allow-Origin '*';
|
|
|
+ #add_header Access-Control-Allow-Headers 'X-Requested-With,Content-Type';
|
|
|
+ #add_header Access-Control-Allow-Methods 'GET,POST,OPTIONS'
|
|
|
+ access_log /data/logs/nginx/newrisapi/access.log;
|
|
|
+ error_log /data/logs/nginx/newrisapi/error.log;
|
|
|
+ location / {
|
|
|
+ if (!-e $request_filename) {
|
|
|
+ rewrite ^/(.*)$ /index.php/$1 last;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ location ~ \.(js|css|gif|jpg|jpeg|png|html)$ {
|
|
|
+ root /data/code/yuanchengpasc/public/;
|
|
|
+ }
|
|
|
+
|
|
|
+# location /dist/ {
|
|
|
+# root /data/gitcode/ychz/client/ris;
|
|
|
+# index index.html;
|
|
|
+# }
|
|
|
+
|
|
|
+ location ~ \.php {
|
|
|
+ include fastcgi_params;
|
|
|
+ set $script $uri;
|
|
|
+ set $path_info "";
|
|
|
+ if ($uri ~ "^(.+\.php)(/.+)") {
|
|
|
+ set $script $1;
|
|
|
+ set $path_info $2;
|
|
|
+ }
|
|
|
+ fastcgi_read_timeout 120;
|
|
|
+ #fastcgi_pass 127.0.0.1:9000;
|
|
|
+ fastcgi_pass unix:/usr/local/php/var/run/php-fpm.sock;
|
|
|
+ fastcgi_index index.php;
|
|
|
+ #fastcgi_index index.php?IF_REWRITE=1;
|
|
|
+ fastcgi_param PATH_INFO $path_info;
|
|
|
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
+ set $real_script_name $fastcgi_script_name;
|
|
|
+ if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
|
|
|
+ set $real_script_name $1;
|
|
|
+ set $path_info $2;
|
|
|
+ }
|
|
|
+ fastcgi_param SCRIPT_NAME $real_script_name;
|
|
|
+ #fastcgi_param SCRIPT_NAME $script;
|
|
|
+ #include fastcgi_params;
|
|
|
+ }
|
|
|
+}
|