removing https dependency
This commit is contained in:
parent
ec2f27b472
commit
d1443d89fd
|
@ -1,15 +1,15 @@
|
||||||
FROM nginx:stable-alpine3.17
|
FROM nginx:stable-alpine3.17
|
||||||
|
|
||||||
# set working directory
|
# set working directory
|
||||||
WORKDIR /usr/share/nginx/arimelody/
|
WORKDIR /web/arimelody/
|
||||||
|
|
||||||
# copy nginx config
|
# copy nginx config
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
# copy static files
|
# copy static files
|
||||||
COPY public /usr/share/nginx/arimelody
|
COPY public /web/arimelody
|
||||||
|
|
||||||
EXPOSE 443
|
EXPOSE 80
|
||||||
|
|
||||||
# start nginx in the foreground so logs appear in docker
|
# start nginx in the foreground so logs appear in docker
|
||||||
CMD ["nginx", "-g", "daemon off;"];
|
CMD ["nginx", "-g", "daemon off;"];
|
||||||
|
|
|
@ -5,8 +5,5 @@ services:
|
||||||
image: arimelody
|
image: arimelody
|
||||||
container_name: arimelody
|
container_name: arimelody
|
||||||
ports:
|
ports:
|
||||||
- 443:443
|
- 80:80
|
||||||
volumes:
|
|
||||||
- ./certs/arimelody.crt:/etc/nginx/ssl/arimelody.crt
|
|
||||||
- ./certs/arimelody.key:/etc/nginx/ssl/arimelody.key
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
16
nginx.conf
16
nginx.conf
|
@ -1,24 +1,18 @@
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
server_name arimelody.me www.arimelody.me;
|
server_name arimelody.me www.arimelody.me;
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/ssl/arimelody.crt;
|
root /web/arimelody/;
|
||||||
ssl_certificate_key /etc/nginx/ssl/arimelody.key;
|
|
||||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
|
|
||||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
||||||
|
|
||||||
root /usr/share/nginx/arimelody/;
|
|
||||||
|
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
|
|
||||||
add_header Cache-Control "max-age=14400";
|
add_header Cache-Control "max-age=14400";
|
||||||
|
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ $uri.html =404;
|
try_files $uri $uri/ $uri.html =404;
|
||||||
rewrite ^/music/(.*)$ https://mellodoot.com/music/$1 last;
|
rewrite ^/music/(.*)$ https://mellodoot.com/music/$1 last;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($scheme != "https") {
|
|
||||||
return 301 https://$server_name$request_uri;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue