Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- server_name chatclub.bg www.chatclub.bg;
- root /var/www/chatclub.bg/public_html;
- index index.php;
- rewrite ^ https://$server_name$request_uri? permanent;
- }
- server {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
- root /var/www/chatclub.bg/public_html;
- index index.php index.html index.htm index.nginx-debian.html;
- server_name chatclub.bg www.chatclub.bg;
- error_page 403 https://chatclub.bg/403.html;
- location = /403.html {
- allow all;
- }
- location ~* \.(jpg|jpeg|png|gif|ico|css|js|manifest|appcache|html|xml|json|rss|atom|cur|mp3|gz|svg|svgz|ogg|ovg|webm|htc)$ {
- expires 365d;
- }
- add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
- location ~* /(?:[.]|.*[.](?:bak|fla|inc|ini|log|psd|sh|sql|swp)|(?:file|upload)s?/.*[.](?:php)){
- return 403;
- }
- if ($host = 'www.chatclub.bg' ) {
- rewrite ^/(.*)$ https://chatclub.bg/$1 permanent;
- }
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_certificate /etc/ssl/chatclub_bg.crt;
- ssl_certificate_key /etc/ssl/chatclub_bg.key;
- ssl_dhparam /etc/ssl/certs/dhparam.pem;
- ssl_stapling on;
- ssl_stapling_verify on;
- ssl_trusted_certificate /etc/nginx/ssl/ocsp.pem;
- location / {
- try_files $uri $uri/ =404;
- }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_read_timeout 240;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~ /\. {
- deny all;
- }
- location ~ /\.ht {
- access_log off;
- log_not_found off;
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement