Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name example.com www.example.com;
- access_log off;
- error_log /var/log/nginx/example.com.error.log;
- root /var/www/example.com/htdocs;
- index index.php index.html index.htm;
- include /var/www/example.com/conf/nginx/*.conf;
- include lukas/cloudflare.conf;
- include lukas/ipjahat.conf;
- include lukas/httpheaderoke-panther.conf;
- include lukas/httpsheaderketat.conf;
- include lukas/ssl.dhparam.tickets.conf;
- # Panther SECURITY.
- location ~ /(addons|attachments|cache|lang|plugins) {
- deny all;
- return 403;
- }
- # Panther SEO FRIENDLY URLS.
- location / {
- if (!-e $request_filename){
- rewrite ^(.*)$ /include/rewrite.php last;
- }
- }
- location ~ \.php$ {
- try_files $uri =404;
- include fastcgi_params;
- fastcgi_pass php7;
- }
- # Security settings for better privacy
- # Deny hidden files
- location ~ /\.well-known {
- allow all;
- }
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- # Deny backup extensions & log files
- location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp|sql)$ {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf)$ {
- add_header "Access-Control-Allow-Origin" "*";
- access_log off;
- log_not_found off;
- expires max;
- }
- location = /favicon.ico {
- access_log off;
- log_not_found off;
- expires max;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement