feat: new service to proxy
This commit is contained in:
parent
db79a3bf56
commit
d7a610625a
1 changed files with 28 additions and 12 deletions
40
nginx.conf
40
nginx.conf
|
@ -1,9 +1,24 @@
|
||||||
events {}
|
events {}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
|
||||||
|
proxy_set_header X-Forwarded-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;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name vps.gerardgascon.com;
|
server_name vps.gerardgascon.com git.gerardgascon.com media.gerardgascon.com;
|
||||||
|
|
||||||
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
|
root /var/www/certbot;
|
||||||
|
default_type "text/plain";
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
@ -19,13 +34,6 @@ http {
|
||||||
index index.html;
|
index index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name git.gerardgascon.com;
|
|
||||||
|
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
server_name git.gerardgascon.com;
|
server_name git.gerardgascon.com;
|
||||||
|
@ -35,10 +43,18 @@ http {
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://100.86.144.2:3002/;
|
proxy_pass http://100.86.144.2:3002/;
|
||||||
proxy_set_header X-Forwarded-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;
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name media.gerardgascon.com;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/media.gerardgascon.com/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/media.gerardgascon.com/privkey.pem;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://100.86.144.2:8097/;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue