12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- server {
- listen 80;
- access_log /logs/access_nginx.log;
- error_log /logs/error_nginx.log;
- client_max_body_size 5M;
- root /www/server/public;
- index index.html index.htm index.php;
- server_name localhost;
- location / {
- if (!-e $request_filename)
- {
- rewrite ^/(.*)$ /index.php?s=$1 last;
- break;
- }
- }
- location @router {
- rewrite ^.*$ /index.html last;
- }
- location ~ /.*\.php/ {
- rewrite ^(.*?/?)(.*\.php)(.*)$ /$2?s=$3 last;
- break;
- }
- location ^~ /platform {
- try_files $uri $uri/ @router;
- alias /www/platform/dist/;
- index index.html index.htm;
- }
- location ^~ /agent_admin {
- try_files $uri $uri/ @router;
- alias /www/agent_admin/dist/;
- index index.html index.htm;
- }
- location ^~ /admin {
- try_files $uri $uri/ @router;
- alias /www/admin/dist/;
- index index.html index.htm;
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /var/www/html;
- }
- location ~ \.php$ {
- fastcgi_pass php:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /www/server/public$fastcgi_script_name;
- include fastcgi_params;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- }
|