Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- server_name knightsenglish.com www.knightsenglish.com;
- return 301 https://www.knightsenglish.com$request_uri;
- }
- server {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
- server_name knightsenglish.com;
- return 301 https://www.knightsenglish.com$request_uri;
- # include your HTTPS config here
- }
- server
- {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
- server_name www.knightsenglish.com;
- ssl_certificate /etc/ssl/private/www.knightsenglish.com.crt;
- ssl_certificate_key /etc/ssl/private/www.knightsenglish.com.key;
- root /var/www/knightsenglish.com/public;
- index index.html index.htm index.php;
- client_max_body_size 32m;
- access_log /var/www/knightsenglish.com/access.log;
- error_log /var/www/knightsenglish.com/error.log;
- # Directives to send expires headers and turn off 404 error logging.
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$
- {
- expires max;
- log_not_found off;
- access_log off;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- ## Disable viewing .htaccess & .htpassword
- location ~ /\.ht {
- deny all;
- }
- location ~* /wp-includes/.*.php$ {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* /(?:uploads|files)/.*.php$ {
- deny all;
- access_log off;
- log_not_found off;
- }
- location = /xmlrpc.php {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~ /readme\.(txt|html)$ {
- deny all;
- access_log off;
- log_not_found off;
- }
- include /etc/nginx/php.conf;
- # rewriting for mailpress tracking configuration
- # wasn't working so its deactivated, tracking should work without
- #location /mail {
- #rewrite ^/mail/analytics/([l|o])-([0-9]+)-([h|p])-([0-9a-zA-Z]+).html /wp-content/plugins/mailpress/mp-includes/action.php?tg=$1&mm=$2&co=$3&us=$4 break;
- #rewrite ^/mail/analytics/([l|o])-([0-9]+)-([h|p])-([0-9a-zA-Z]+).html /wp-content/plugins/mailpress/mp-includes/action.php?tg=$1&mm=$2&co=$3&us=$4 last;
- #}
- #checking for bots
- #if ( $is_bot )
- #{
- #return 444;
- #}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement