Added server blocks

This commit is contained in:
Luke Else 2022-01-17 21:44:10 +00:00
parent f2fdd99df0
commit 65fb8623e3
4 changed files with 160 additions and 0 deletions

View File

@ -0,0 +1,40 @@
server{
server_name bitwarden.luke-else.co.uk www.bitwarden.luke-else.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8081;
proxy_read_timeout 90;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/bitwarden.luke-else.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/bitwarden.luke-else.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server{
if ($host = www.bitwarden.luke-else.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = bitwarden.luke-else.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name bitwarden.luke-else.co.uk www.bitwarden.luke-else.co.uk;
return 404; # managed by Certbot
}

40
server/luke-else.co.uk Normal file
View File

@ -0,0 +1,40 @@
server{
server_name luke-else.co.uk www.luke-else.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8000;
proxy_read_timeout 90;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/luke-else.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/luke-else.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server{
if ($host = www.luke-else.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = luke-else.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name luke-else.co.uk www.luke-else.co.uk;
return 404; # managed by Certbot
}

View File

@ -0,0 +1,40 @@
server{
server_name mysql.luke-else.co.uk www.mysql.luke-else.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8080;
proxy_read_timeout 90;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mysql.luke-else.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mysql.luke-else.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server{
if ($host = www.mysql.luke-else.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = mysql.luke-else.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name mysql.luke-else.co.uk www.mysql.luke-else.co.uk;
return 404; # managed by Certbot
}

40
server/snexo.co.uk Normal file
View File

@ -0,0 +1,40 @@
server{
server_name snexo.co.uk www.snexo.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8001;
proxy_read_timeout 90;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/snexo.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/snexo.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server{
if ($host = www.snexo.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = snexo.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name snexo.co.uk www.snexo.co.uk;
return 404; # managed by Certbot
}