ngx_test.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. }
  22. server {
  23. listen 80;
  24. client_max_body_size 4G;
  25. server_name yii2_front.hiwavo.com;
  26. #keepalive_timeout 5;
  27. access_log /home/www/yii2_app/webApp/common/nginx_conf/log/ngx_access.log main;
  28. error_log /home/www/yii2_app/webApp/common/nginx_conf/log/ngx_error.log;
  29. root /home/www/yii2_app/webApp/frontend/web/;
  30. index index.php index.html index.htm;
  31. try_files $uri $uri/ /index.php?$args;
  32. location ~ \uploads{
  33. root /home/www/yii2_app/webApp/frontend/web/uploads/;
  34. }
  35. location ~ \.php$ {
  36. fastcgi_pass 127.0.0.1:9000;
  37. fastcgi_index index.php;
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39. include fastcgi_params;
  40. try_files $uri =404;
  41. }
  42. }