add usage of environment variables
This commit is contained in:
@@ -6,11 +6,20 @@ http {
|
||||
server_tokens off;
|
||||
charset utf-8;
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name adam-french.co.uk www.adam-french.co.uk;
|
||||
|
||||
# Allow Certbot to access the ACME challenge
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
# Redirect everything else to HTTPS
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
server {
|
||||
@@ -29,7 +38,7 @@ http {
|
||||
}
|
||||
|
||||
location /posts/ {
|
||||
proxy_pass http://localhost:8080/posts;
|
||||
proxy_pass http://backend:8080/posts;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
Reference in New Issue
Block a user