Browse Source

refactor: add conf that redirects traffic to non www urls

master
Apostolos Fanakis 4 years ago
parent
commit
dcb558b451
Signed by: Apostolof GPG Key ID: 8600B4C4163B3269
  1. 3
      docker-compose.yml
  2. 0
      nginx-reverse-proxy-confs/client-max-body-size.conf
  3. 64
      nginx-reverse-proxy-confs/redirect.conf

3
docker-compose.yml

@ -30,7 +30,8 @@ services:
- ./volumes/nginx/html:/usr/share/nginx/html - ./volumes/nginx/html:/usr/share/nginx/html
- ./volumes/nginx/dhparam:/etc/nginx/dhparam - ./volumes/nginx/dhparam:/etc/nginx/dhparam
- ./volumes/nginx/certs:/etc/nginx/certs:ro - ./volumes/nginx/certs:/etc/nginx/certs:ro
- ./client-max-body-size.conf:/etc/nginx/conf.d/client-max-body-size.conf:ro - ./nginx-reverse-proxy-confs/client-max-body-size.conf:/etc/nginx/conf.d/client-max-body-size.conf:ro
- ./nginx-reverse-proxy-confs/redirect.conf:/etc/nginx/conf.d/redirect.conf:ro
# Letsencrypt automated creation, renewal and use of Let's Encrypt certificates # Letsencrypt automated creation, renewal and use of Let's Encrypt certificates
# Reference: # Reference:

0
client-max-body-size.conf → nginx-reverse-proxy-confs/client-max-body-size.conf

64
nginx-reverse-proxy-confs/redirect.conf

@ -0,0 +1,64 @@
server {
server_name www.ecentrics.net;
return 301 $scheme://ecentrics.net$request_uri;
}
server {
server_name www.jenkins.ecentrics.net;
return 301 $scheme://jenkins.ecentrics.net$request_uri;
}
server {
server_name www.concordia.ecentrics.net;
return 301 $scheme://concordia.ecentrics.net$request_uri;
}
server {
server_name www.staging.concordia.ecentrics.net;
return 301 $scheme://staging.concordia.ecentrics.net$request_uri;
}
server {
server_name www.guide.concordia.ecentrics.net;
return 301 $scheme://guide.concordia.ecentrics.net$request_uri;
}
server {
server_name www.staging.guide.concordia.ecentrics.net;
return 301 $scheme://staging.guide.concordia.ecentrics.net$request_uri;
}
server {
server_name www.ganache.ecentrics.net;
return 301 $scheme://ganache.ecentrics.net$request_uri;
}
server {
server_name www.staging.ganache.ecentrics.net;
return 301 $scheme://staging.ganache.ecentrics.net$request_uri;
}
server {
server_name www.rendezvous.ecentrics.net;
return 301 $scheme://rendezvous.ecentrics.net$request_uri;
}
server {
server_name www.contracts.concordia.ecentrics.net;
return 301 $scheme://contracts.concordia.ecentrics.net$request_uri;
}
server {
server_name www.staging.contracts.concordia.ecentrics.net;
return 301 $scheme://staging.contracts.concordia.ecentrics.net$request_uri;
}
server {
server_name www.pinner.concordia.ecentrics.net;
return 301 $scheme://pinner.concordia.ecentrics.net$request_uri;
}
server {
server_name www.staging.pinner.concordia.ecentrics.net;
return 301 $scheme://staging.pinner.concordia.ecentrics.net$request_uri;
}
Loading…
Cancel
Save