File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed
Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,12 @@ FROM nginx:alpine
33
44COPY nginx.conf /etc/nginx/nginx.conf
55
6+ # for ssl
7+ # COPY elisa.crt /etc/nginx/ssl/elisa.crt
8+ # COPY private.key /etc/nginx/ssl/private.key
9+
610EXPOSE 80
11+ EXPOSE 443
712
813WORKDIR /usr/share/nginx/html
914
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ services:
44 app :
55 image : ' angular-docker'
66 ports :
7- - 3000:80
7+ - 80:80
8+ - 443:443
Original file line number Diff line number Diff line change 77http {
88 server {
99 listen 80 ;
10- server_name localhost;
10+ server_name elisatheai.me www.elisatheai.me;
11+
12+ # return 301 https://www.elisatheai.me/;
1113
1214 root /usr/share/nginx/html;
1315 index index .html index .htm;
@@ -22,4 +24,25 @@ http {
2224 try_files $uri $uri / /index .html;
2325 }
2426 }
27+
28+ server {
29+ listen 443 ssl ;
30+ server_name elisatheai.me www.elisatheai.me;
31+
32+ ssl_certificate /etc/nginx/ssl /elisa.crt;
33+ ssl_certiifcate_key /etc/nginx/ssl /private.key;
34+
35+ root /usr/share/nginx/html;
36+ index index .html index .htm;
37+ include /etc/nginx/mime.types ;
38+
39+ gzip on;
40+ gzip_min_length 1000 ;
41+ gzip_proxied expired no-cache no-store private auth;
42+ gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
43+
44+ location / {
45+ try_files $uri $uri / /index .html;
46+ }
47+ }
2548}
You can’t perform that action at this time.
0 commit comments