removing https dependency

This commit is contained in:
ari melody 2024-01-17 03:55:48 +00:00
parent ec2f27b472
commit d1443d89fd
Signed by: ari
GPG key ID: CF99829C92678188
3 changed files with 9 additions and 18 deletions

View file

@ -1,15 +1,15 @@
FROM nginx:stable-alpine3.17
# set working directory
WORKDIR /usr/share/nginx/arimelody/
WORKDIR /web/arimelody/
# copy nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 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
CMD ["nginx", "-g", "daemon off;"];

View file

@ -5,8 +5,5 @@ services:
image: arimelody
container_name: arimelody
ports:
- 443:443
volumes:
- ./certs/arimelody.crt:/etc/nginx/ssl/arimelody.crt
- ./certs/arimelody.key:/etc/nginx/ssl/arimelody.key
- 80:80
restart: unless-stopped

View file

@ -1,24 +1,18 @@
server {
listen 443 ssl;
listen 80;
listen [::]:80;
server_name arimelody.me www.arimelody.me;
ssl_certificate /etc/nginx/ssl/arimelody.crt;
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/;
root /web/arimelody/;
client_max_body_size 0;
add_header Cache-Control "max-age=14400";
server_tokens off;
location / {
try_files $uri $uri/ $uri.html =404;
rewrite ^/music/(.*)$ https://mellodoot.com/music/$1 last;
}
if ($scheme != "https") {
return 301 https://$server_name$request_uri;
}
}