You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.6 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. #upstream php73 {
  2. # server php73:9000;
  3. #}
  4. upstream php74 {
  5. server php74:9000;
  6. }
  7. upstream php81 {
  8. server php81:9000;
  9. }
  10. map $http_host $root {
  11. octobercms.local.wpstudio.ru /usr/share/nginx/html/someproject;
  12. wordpress.local.wpstudio.ru /usr/share/nginx/html/someprojectwp;
  13. }
  14. # @see https://github.com/OFFLINE-GmbH/oc-responsive-images-plugin/#responsive-images
  15. map $http_accept $webp_suffix {
  16. default "";
  17. "~*webp" ".webp";
  18. }
  19. resolver 127.0.0.11;
  20. map $http_host $uploads_upstream {
  21. wordpress.local.wpstudio.ru "https://somewp.site";
  22. }
  23. server {
  24. listen 80 default;
  25. root $root;
  26. #include global/auth.conf;
  27. #@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
  28. include includes.d/octobercms.conf;
  29. include includes.d/staticfiles.conf;
  30. client_max_body_size 300M;
  31. large_client_header_buffers 4 32k;
  32. proxy_buffer_size 16k;
  33. proxy_buffers 8 16k;
  34. proxy_busy_buffers_size 32k;
  35. location ~ ^/index.php {
  36. fastcgi_pass php81;
  37. include fastcgi_params;
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39. fastcgi_param SERVER_NAME $host;
  40. }
  41. }
  42. server {
  43. listen 80;
  44. server_name
  45. some-php74-site.local.wpstudio.ru
  46. ;
  47. root $root;
  48. #include global/auth.conf;
  49. #@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
  50. include includes.d/octobercms.conf;
  51. include includes.d/staticfiles.conf;
  52. client_max_body_size 300M;
  53. location ~ ^/index.php {
  54. fastcgi_pass php74;
  55. include fastcgi_params;
  56. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  57. fastcgi_param SERVER_NAME $host;
  58. }
  59. }