ngx_test.conf 766 B

1234567891011121314151617181920212223
  1. server {
  2. listen 80;
  3. client_max_body_size 4G;
  4. server_name yii2_admin.hiwavo.com;
  5. #keepalive_timeout 5;
  6. access_log /home/www/yii2_app/webApp/common/nginx_conf/log/ngx_access.log main;
  7. error_log /home/www/yii2_app/webApp/common/nginx_conf/log/ngx_error.log;
  8. root /home/www/yii2_app/webApp/backend/web;
  9. index index.php index.html index.htm;
  10. try_files $uri $uri/ /index.php?$args;
  11. location ~ /api/(?!index.php).*$ {
  12. rewrite /api/(.*) /api/index.php?r=$1 last;
  13. }
  14. location ~ \.php$ {
  15. fastcgi_pass 127.0.0.1:9000;
  16. fastcgi_index index.php;
  17. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  18. include fastcgi_params;
  19. try_files $uri =404;
  20. }
  21. }