Advertisement
Guest User

Untitled

a guest
May 13th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.23 KB | None | 0 0
  1. server {
  2.     listen 443 ssl;
  3.  
  4.     ssl_certificate         /etc/nginx/ssl/freecash.su.crt;
  5.     ssl_certificate_key     /etc/nginx/ssl/freecash.su.key;
  6.  
  7.     server_name    site.com;
  8.  
  9.     access_log      /var/log/access.log;
  10.  
  11.     error_log       /var/log/error.log;
  12.  
  13.     rewrite_log     on;
  14.  
  15.     root            /var/www/html/public;
  16.  
  17.     index           index.php;
  18.  
  19.     location / {
  20.         try_files   $uri $uri/ /index.php?$query_string;
  21.     }
  22.  
  23.     if (!-d $request_filename) {
  24.         rewrite     ^/(.+)/$ /$1 permanent;
  25.     }
  26.  
  27.     location ~* \.php$ {
  28.             fastcgi_pass                    unix:/var/run/php/php7.0-fpm.sock;
  29.             fastcgi_index                   index.php;
  30.             fastcgi_split_path_info         ^(.+\.php)(.*)$;
  31.             include                         /etc/nginx/fastcgi_params;
  32.             fastcgi_param                   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  33.             fastcgi_param                   HTTPS on;
  34.     }
  35.  
  36.     location ~ /\.ht {
  37.             deny all;
  38.     }
  39.  
  40.     location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
  41.             expires 365d;
  42.     }
  43. }
  44.  
  45. server {
  46.     listen 80;
  47.  
  48.     server_name    site.com;
  49.  
  50.     access_log      /var/log/access.log;
  51.  
  52.     error_log       /var/log/error.log;
  53.  
  54.     rewrite_log     on;
  55.  
  56.     root            /var/www/html/public;
  57.  
  58.     index           index.php;
  59.  
  60.     location / {
  61.         return 301 http://www.google.com;
  62.         #return 301 https://$server_name$request_uri;
  63.     }
  64.  
  65.     location /getPayment {
  66.         try_files   $uri $uri/ /index.php?$query_string;
  67.     }
  68.  
  69.     if (!-d $request_filename) {
  70.         rewrite   ^/(.+)/$ /$1 permanent;
  71.     }
  72.  
  73.     location ~* \.php$ {
  74.             fastcgi_pass                    unix:/var/run/php/php7.0-fpm.sock;
  75.             fastcgi_index                   index.php;
  76.             fastcgi_split_path_info         ^(.+\.php)(.*)$;
  77.             include                         /etc/nginx/fastcgi_params;
  78.             fastcgi_param                   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  79.     }
  80.  
  81.     location ~ /\.ht {
  82.             deny all;
  83.     }
  84.  
  85.     location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
  86.             expires 365d;
  87.     }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement