From d1443d89fdf9b3c5e166339165b18e0a1a8f7889 Mon Sep 17 00:00:00 2001 From: ari melody Date: Wed, 17 Jan 2024 03:55:48 +0000 Subject: [PATCH] removing https dependency --- Dockerfile | 6 +++--- docker-compose-example.yml | 5 +---- nginx.conf | 16 +++++----------- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index cd6c348..83432b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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;"]; diff --git a/docker-compose-example.yml b/docker-compose-example.yml index 67e4be9..f6e8d39 100644 --- a/docker-compose-example.yml +++ b/docker-compose-example.yml @@ -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 diff --git a/nginx.conf b/nginx.conf index 79e28c2..aa120c9 100644 --- a/nginx.conf +++ b/nginx.conf @@ -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; - } }