diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 200833e..3f81177 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,6 +1,4 @@ FROM nginx:1.15.8 RUN rm /etc/nginx/conf.d/default.conf -COPY default.conf /etc/nginx/conf.d -# COPY localhost.key /etc/nginx/conf.d -# COPY localhost.crt /etc/nginx/conf.d \ No newline at end of file +COPY default.conf /etc/nginx/conf.d \ No newline at end of file diff --git a/nginx/default.conf b/nginx/default.conf index 5121e3b..99447e8 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -10,6 +10,13 @@ server { return 200; } + # nginx 작동 여부를 확인하는 html (http://cropdocter.shop/) + location /nginx { + root /usr/share/nginx/html; + index index.html index.htm; + } + + location / { proxy_pass http://django; proxy_set_header Host $host; @@ -21,24 +28,3 @@ server { alias /backend/static/; } } - - -# https 적용 코드 수정 중 -# server { -# listen 443 ssl; - -# ssl_certificate /etc/nginx/conf.d/localhost.crt; -# ssl_certificate_key /etc/nginx/conf.d/localhost.key; - -# # access_log /var/log/nginx/443_access.log; -# # error_log /var/log/nginx/443_error.log; - -# location / { -# proxy_set_header Host $host:$server_port; -# proxy_pass http://django; -# proxy_redirect off; -# } -# location /static/ { -# alias /backend/static/; -# } -# } \ No newline at end of file diff --git a/nginx/localhost.crt b/nginx/localhost.crt deleted file mode 100644 index c3b5998..0000000 --- a/nginx/localhost.crt +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN CERTIFICATE----- - ------END CERTIFICATE----- diff --git a/nginx/localhost.key b/nginx/localhost.key deleted file mode 100644 index 1ded009..0000000 --- a/nginx/localhost.key +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN PRIVATE KEY----- - ------END PRIVATE KEY-----