Start adding virtual sites with nginx.
This commit is contained in:
parent
03778e9834
commit
4be5e93c9c
7 changed files with 68 additions and 29 deletions
|
@ -1,4 +1,3 @@
|
|||
FROM docker.io/nginx
|
||||
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
COPY nginx.conf /etc/nginx/conf.d
|
||||
FROM docker.io/nginxproxy/nginx-proxy
|
||||
COPY vhost.d/default /etc/nginx/vhost.d/default
|
||||
COPY custom.conf /etc/nginx/conf.d/custom.conf
|
1
nginx/custom.conf
Normal file
1
nginx/custom.conf
Normal file
|
@ -0,0 +1 @@
|
|||
client_max_body_size 100M;
|
|
@ -1,25 +0,0 @@
|
|||
upstream wedding_site {
|
||||
server web:8000;
|
||||
}
|
||||
|
||||
server {
|
||||
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
proxy_pass http://wedding_site;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_redirect off;
|
||||
client_max_body_size 100M;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
alias /staticfiles/;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /mediafiles/;
|
||||
}
|
||||
|
||||
}
|
9
nginx/vhost.d/default
Normal file
9
nginx/vhost.d/default
Normal file
|
@ -0,0 +1,9 @@
|
|||
location /static/ {
|
||||
alias /staticfiles/;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /mediafiles/;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue