Skip to content

Instantly share code, notes, and snippets.

@pentago
Created December 18, 2018 13:15
Show Gist options
  • Save pentago/fa2965f8eafe3c73664b3d3185b39601 to your computer and use it in GitHub Desktop.
Save pentago/fa2965f8eafe3c73664b3d3185b39601 to your computer and use it in GitHub Desktop.
// Mobile Site Nginx config
server {
listen 80;
server_name m.sangfor.com;
return 301 https://m.sangfor.com$request_uri;
}
server {
listen 443;
server_name m.sangfor.com;
(...rest of mobile site server block configs...)
}
// Website Nginx config
server {
listen 80;
server_name sangfor.com www.sangfor.com;
return 301 https://www.sangfor.com$request_uri;
}
server {
listen 443;
server_name sangfor.com;
return 301 https://www.sangfor.com$request_uri;
}
server {
listen 443;
server_name www.sangfor.com;
(...rest of m-site server block configs...)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment