forked from linux/WebHosting
changes
This commit is contained in:
+2
-5
@@ -1,5 +1,3 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
@@ -10,7 +8,7 @@ services:
|
||||
volumes:
|
||||
- /etc/pki/tls/certs/excalidraw.psi.ch.crt:/etc/nginx/certs/cert.crt:ro
|
||||
- /etc/pki/tls/private/excalidraw.psi.ch.key:/etc/nginx/certs/cert.key:ro
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- /etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
- excalidraw
|
||||
|
||||
@@ -18,5 +16,4 @@ services:
|
||||
image: excalidraw/excalidraw:latest
|
||||
container_name: excalidraw
|
||||
ports:
|
||||
- "5000:5000"
|
||||
|
||||
- "5000:80"
|
||||
|
||||
+38
-16
@@ -1,22 +1,44 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name excalidraw.psi.ch;
|
||||
return 301 https://$host$request_uri;
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name excalidraw.psi.ch;
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/excalidraw.psi.ch.crt;
|
||||
ssl_certificate_key /etc/nginx/certs/excalidraw.psi.ch.key;
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
location / {
|
||||
proxy_pass http://excalidraw:5000;
|
||||
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;
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name excalidraw.psi.ch;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name excalidraw.psi.ch;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/cert.crt;
|
||||
ssl_certificate_key /etc/nginx/certs/cert.key;
|
||||
|
||||
location / {
|
||||
proxy_pass http://excalidraw:80;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user