Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 3.12 KB | None | 0 0
  1. server {
  2.     server_name admitriy.club www.admitriy.club;
  3.     charset off;
  4.     index index.php index.html;
  5.     disable_symlinks if_not_owner from=$root_path;
  6.     include /etc/nginx/vhosts-includes/*.conf;
  7.     include /etc/nginx/vhosts-resources/admitriy.club/*.conf;
  8.     access_log off;
  9.     error_log /dev/null crit;
  10.     ssi on;
  11.     return 301 https://$host:443$request_uri;
  12.     set $root_path /var/www/altercpa/data/www/admitriy.club;
  13.     root $root_path;
  14.     listen 62.212.86.184:80;
  15.     location ~ /data/(cache|load|session|tpls|work) {
  16.     deny all;
  17.     return 403;
  18. }
  19. location ~ /tasks {
  20.     deny all;
  21.     return 403;
  22. }
  23. location /api {
  24.     rewrite ^/api/([a-z]+)/([a-z\-]+)\.([a-z]+)/? /?api=$1&f=$2&t=$3 last;
  25.     rewrite ^/api/? / redirect;
  26. }
  27. location /go {
  28.     rewrite ^/go([0-9]+)$ /go.php?flow=$1;
  29. }
  30. location /to {
  31.     rewrite ^/to([0-9]+)$ /go.php?test=$1;
  32. }
  33. location = /neworder {
  34.     rewrite ^(.*)$ /?neworder=add last;
  35. }
  36. location / {
  37.     rewrite ^/a-([a-z\-]+)/([0-9]+)/?$ /?a=$1&id=$2 last;
  38.     rewrite ^/a-([a-z\-]+)/?$ /?a=$1 last;
  39.     rewrite ^/([a-z\-]+)/([0-9]+)/?$ /?m=$1&id=$2 last;
  40.     rewrite ^/([a-z\-]+)/?$ /?m=$1 last;
  41.     try_files $uri $uri/ =404;
  42. }
  43.     location @php {
  44.         fastcgi_index index.php;
  45.         fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@admitriy.club";
  46.         fastcgi_pass unix:/var/www/php-fpm/altercpa.sock;
  47.         fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  48.         try_files $uri =404;
  49.         include fastcgi_params;
  50.     }
  51. }
  52. server {
  53.     server_name admitriy.club www.admitriy.club;
  54.     ssl_certificate "/var/www/httpd-cert/altercpa/admitriy.club_le1.crtca";
  55.     ssl_certificate_key "/var/www/httpd-cert/altercpa/admitriy.club_le1.key";
  56.     ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
  57.     ssl_prefer_server_ciphers on;
  58.     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  59.     ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
  60.     charset off;
  61.     index index.php index.html;
  62.     disable_symlinks if_not_owner from=$root_path;
  63.     include /etc/nginx/vhosts-includes/*.conf;
  64.     include /etc/nginx/vhosts-resources/admitriy.club/*.conf;
  65.     access_log off;
  66.     error_log /dev/null crit;
  67.     ssi on;
  68.     set $root_path /var/www/altercpa/data/www/admitriy.club;
  69.     root $root_path;
  70.     listen 62.212.86.184:443 ssl;
  71.     location ~ /data/(cache|load|session|tpls|work) {
  72.     deny all;
  73.     return 403;
  74. }
  75. location ~ /tasks {
  76.     deny all;
  77.     return 403;
  78. }
  79. location /api {
  80.     rewrite ^/api/([a-z]+)/([a-z\-]+)\.([a-z]+)/? /?api=$1&f=$2&t=$3 last;
  81.     rewrite ^/api/? / redirect;
  82. }
  83. location /go {
  84.     rewrite ^/go([0-9]+)$ /go.php?flow=$1;
  85. }
  86. location /to {
  87.     rewrite ^/to([0-9]+)$ /go.php?test=$1;
  88. }
  89. location = /neworder {
  90.     rewrite ^(.*)$ /?neworder=add last;
  91. }
  92. location / {
  93.     rewrite ^/a-([a-z\-]+)/([0-9]+)/?$ /?a=$1&id=$2 last;
  94.     rewrite ^/a-([a-z\-]+)/?$ /?a=$1 last;
  95.     rewrite ^/([a-z\-]+)/([0-9]+)/?$ /?m=$1&id=$2 last;
  96.     rewrite ^/([a-z\-]+)/?$ /?m=$1 last;
  97.     try_files $uri $uri/ =404;
  98. }
  99.     location @php {
  100.         fastcgi_index index.php;
  101.         fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@admitriy.club";
  102.         fastcgi_pass unix:/var/www/php-fpm/altercpa.sock;
  103.         fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  104.         try_files $uri =404;
  105.         include fastcgi_params;
  106.     }
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement