# server server { listen 213.229.74.105:80; server_name entrydns.net; server_name entrydns.org; server_name www.entrydns.net; server_name www.entrydns.org; # max body size client_max_body_size 1m; rewrite ^(.*) https://$server_name$1 permanent; # always redirects to entrydns.net if ($host != 'entrydns.net') { rewrite ^/(.*)$ http://entrydns.net/$1 permanent; } location / { proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1; } } # ssl server { listen 213.229.74.105:443; server_name entrydns.net; server_name entrydns.org; server_name www.entrydns.net; server_name www.entrydns.org; # max body size client_max_body_size 1m; ssl on; ssl_certificate /etc/pki/tls/certs/entrydns.net-crt.pem; ssl_certificate_key /etc/pki/tls/private/entrydns.net-key.pem; # rewrite ^(.*) https://$server_name$1 permanent; # always redirects to entrydns.net if ($host != 'entrydns.net') { rewrite ^/(.*)$ https://entrydns.net/$1 permanent; } location / { proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1; } }