Skip to content

Instantly share code, notes, and snippets.

@rajivseelam
Last active August 29, 2015 14:05
Show Gist options
  • Save rajivseelam/ed840f4d435c0ae8cfcc to your computer and use it in GitHub Desktop.
Save rajivseelam/ed840f4d435c0ae8cfcc to your computer and use it in GitHub Desktop.
Ngnix Configuration
server {
listen 80;
server_name example.com www.example.com;
return 301 https://www.example.com$request_uri;
}
server {
listen 443 ssl;
server_name example.com www.example.com;
root /home/forge/default/public;
if ($host = 'example.com') {
rewrite ^/(.*)$ https://www.example.com/$1 permanent;
}
//Some content is omitted for brevity
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment