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.

65 lines
1.8 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #upstream php73 {
  2. # server php73:9000;
  3. #}
  4. upstream php74 {
  5. server php74:9000;
  6. }
  7. map $http_host $root {
  8. octobercms.ru.local.wpstudio.ru /usr/share/nginx/html/someproject;
  9. wordpress.ru.local.wpstudio.ru /usr/share/nginx/html/someprojectwp;
  10. }
  11. # @see https://github.com/OFFLINE-GmbH/oc-responsive-images-plugin/#responsive-images
  12. map $http_accept $webp_suffix {
  13. default "";
  14. "~*webp" ".webp";
  15. }
  16. server {
  17. server_name
  18. octobercms.ru.local.wpstudio.ru
  19. ;
  20. listen 80 default;
  21. root $root;
  22. #include global/auth.conf;
  23. #@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
  24. include includes.d/octobercms.conf;
  25. include includes.d/staticfiles.conf;
  26. location ~ ^/index.php {
  27. fastcgi_pass php74;
  28. include fastcgi_params;
  29. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30. fastcgi_param SERVER_NAME $host;
  31. }
  32. }
  33. server {
  34. server_name
  35. wordpress.ru.local.wpstudio.ru
  36. ;
  37. listen 80;
  38. root $root;
  39. index index.html index.htm index.php;
  40. location / {
  41. try_files $uri $uri/ /index.php?$args;
  42. }
  43. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  44. location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
  45. access_log off;
  46. }
  47. location ~ [^/]\.php(/|$) {
  48. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  49. if (!-f $document_root$fastcgi_script_name) {
  50. return 404;
  51. }
  52. include fastcgi_params;
  53. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  54. fastcgi_param PATH_INFO $fastcgi_path_info;
  55. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  56. fastcgi_param SERVER_NAME $host;
  57. fastcgi_pass php74;
  58. fastcgi_index index.php;
  59. }
  60. }