Skip to content

Instantly share code, notes, and snippets.

@Kami
Created February 27, 2013 17:41
Show Gist options
  • Select an option

  • Save Kami/5049881 to your computer and use it in GitHub Desktop.

Select an option

Save Kami/5049881 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name naturalmusclezone.com www.naturalmusclezone.com;
rewrite ^ https://$host$request_uri? permanent;
}
server {
listen 443 ssl;
server_name naturalmusclezone.com www.naturalmusclezone.com;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 15m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers RC4:HIGH:!aNULL:!MD5:!kEDH;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security max-age=604800;
add_header X-Frame-Options SAMEORIGIN;
location ~* ^.+.(jpe?g|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|avi|mp3)$ {
root /var/www/domains/naturalmusclezone.com/htdocs;
access_log off;
log_not_found off;
expires 30d;
}
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect http:// https://;
proxy_pass http://apache;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment