Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 443 ssl;
- ssl_certificate /etc/nginx/ssl/freecash.su.crt;
- ssl_certificate_key /etc/nginx/ssl/freecash.su.key;
- server_name site.com;
- access_log /var/log/access.log;
- error_log /var/log/error.log;
- rewrite_log on;
- root /var/www/html/public;
- index index.php;
- location / {
- try_files $uri $uri/ /index.php?$query_string;
- }
- if (!-d $request_filename) {
- rewrite ^/(.+)/$ /$1 permanent;
- }
- location ~* \.php$ {
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_index index.php;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param HTTPS on;
- }
- location ~ /\.ht {
- deny all;
- }
- location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
- expires 365d;
- }
- }
- server {
- listen 80;
- server_name site.com;
- access_log /var/log/access.log;
- error_log /var/log/error.log;
- rewrite_log on;
- root /var/www/html/public;
- index index.php;
- location / {
- return 301 http://www.google.com;
- #return 301 https://$server_name$request_uri;
- }
- location /getPayment {
- try_files $uri $uri/ /index.php?$query_string;
- }
- if (!-d $request_filename) {
- rewrite ^/(.+)/$ /$1 permanent;
- }
- location ~* \.php$ {
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_index index.php;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- location ~ /\.ht {
- deny all;
- }
- location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
- expires 365d;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement