Advertisement
NFL

Untitled

NFL
Nov 1st, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.37 KB | None | 0 0
  1. #user 'medini' virtual host 'medini-original.com' configuration file
  2. server {
  3.     server_name medini-original.com www.medini-original.com;
  4.     charset UTF-8;
  5.     disable_symlinks if_not_owner from=$root_path;
  6.     index index.html index.php;
  7.     root $root_path;
  8.     set $root_path /var/www/medini/data/www/medini-original.com;
  9.     access_log off ;
  10.     error_log /dev/null crit;
  11.  
  12.     location / {
  13.  
  14.         location ~ [^/]\.ph(p\d*|tml)$ {
  15.             try_files /does_not_exists @php;
  16.         }
  17.     }
  18.     location @fallback {
  19.         access_log off ;
  20.     }
  21.     location @php {
  22.         fastcgi_index index.php;
  23.         fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@medini-original.com";
  24.         fastcgi_pass unix:/var/www/php-fpm/medini.sock;
  25.         fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  26.         try_files $uri =404;
  27.         include fastcgi_params;
  28.     }
  29.     listen 138.201.136.206:80;
  30. }
  31. server {
  32.     server_name medini-original.com www.medini-original.com;
  33.     charset UTF-8;
  34.     disable_symlinks if_not_owner from=$root_path;
  35.     index index.html index.php;
  36.     root $root_path;
  37.     set $root_path /var/www/medini/data/www/medini-original.com;
  38.     access_log off ;
  39.     error_log /dev/null crit;
  40.     include /etc/nginx/vhosts-includes/*.conf;
  41.         include /etc/nginx/vhosts-includes/*.conf;
  42.     if ($request_uri ~* "^(.*/)index\.(php|html)$") {
  43.         return 301 $1;
  44.     }
  45.  
  46.  
  47.  
  48. if ($request_uri ~* "\/\/") {
  49.   rewrite ^/(.*)      $scheme://$host/$1 permanent;
  50. }
  51.  
  52. if ($request_filename !~* .(txt|gif|html|jpe?g|png|json|ico|js|css|flv|swf|pdf|xml|html|php|otf|woff|ttf|woff2|htm)$ ) {
  53.        rewrite (^[^?]+[^/?])([^/]*)$ $1/$2 permanent;
  54. }
  55.     location / {
  56.           try_files $uri $uri/ /index.php?$args;
  57. if ($http_host ~* "^www.medini-original\.com$")
  58. { rewrite ^(.*)$ http://medini-original.com$1 redirect; }
  59.         location ~ [^/]\.ph(p\d*|tml)$ {
  60.             try_files /does_not_exists @php;
  61.         }
  62.     }
  63.     location @fallback {
  64.         access_log off ;
  65.     }
  66.     location @php {
  67.         fastcgi_index index.php;
  68.         fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@medini-original.com";
  69.         fastcgi_pass unix:/var/www/php-fpm/medini.sock;
  70.         fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  71.         try_files $uri =404;
  72.         include fastcgi_params;
  73.     }
  74.     listen 138.201.136.206:443;
  75.     ssl on;
  76.     ssl_certificate "/var/www/httpd-cert/medini/medini-original.com_le1.crtca";
  77.     ssl_certificate_key "/var/www/httpd-cert/medini/medini-original.com_le1.key";
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement