Преглед изворни кода

:recycle: updating the docker and nginx confs

cia-next
maeda пре 3 година
родитељ
комит
c88848382e
3 измењених фајлова са 15 додато и 15 уклоњено
  1. 6
    6
      nginx/Dockerfile
  2. 4
    4
      nginx/configs/default.conf
  3. 5
    5
      nginx/configs/nginx.conf

+ 6
- 6
nginx/Dockerfile Прегледај датотеку

4
 # COPY ./nginx/temp/index.html /opt/<path-to-project>/index.html
4
 # COPY ./nginx/temp/index.html /opt/<path-to-project>/index.html
5
 
5
 
6
 ### Setup SSL
6
 ### Setup SSL
7
-# RUN mkdir -p /etc/ssl/private && chmod 700 /etc/ssl/private
8
-# RUN mkdir -p /etc/ssl/certs && chmod 700 /etc/ssl/certs
7
+RUN mkdir -p /etc/ssl/private && chmod 700 /etc/ssl/private
8
+RUN mkdir -p /etc/ssl/certs && chmod 700 /etc/ssl/certs
9
 
9
 
10
 ### Copy the SSL Certificate and Key
10
 ### Copy the SSL Certificate and Key
11
-# COPY ./nginx/keys/letsencrypt.key /etc/ssl/private/letsencrypt.key
12
-# COPY ./nginx/keys/letsencrypt.crt /etc/ssl/certs/letsencrypt.crt
11
+COPY ./nginx/keys/letsencrypt.key /etc/ssl/private/letsencrypt.key
12
+COPY ./nginx/keys/letsencrypt.crt /etc/ssl/certs/letsencrypt.crt
13
 
13
 
14
 ### Configure Nginx to Use SSL
14
 ### Configure Nginx to Use SSL
15
 RUN mkdir -p /etc/nginx/snippets
15
 RUN mkdir -p /etc/nginx/snippets
16
-# COPY ./nginx/configs/letsencrypt.conf /etc/nginx/snippets/letsencrypt.conf
17
-# COPY ./nginx/configs/ssl-params.conf /etc/nginx/snippets/ssl-params.conf
16
+COPY ./nginx/configs/letsencrypt.conf /etc/nginx/snippets/letsencrypt.conf
17
+COPY ./nginx/configs/ssl-params.conf /etc/nginx/snippets/ssl-params.conf
18
 
18
 
19
 ### Move over the nginx.conf and default.config server configs
19
 ### Move over the nginx.conf and default.config server configs
20
 COPY ./nginx/configs/default.conf /etc/nginx/conf.d/default.conf
20
 COPY ./nginx/configs/default.conf /etc/nginx/conf.d/default.conf

+ 4
- 4
nginx/configs/default.conf Прегледај датотеку

1
 # Upstream sites for proxy-ing
1
 # Upstream sites for proxy-ing
2
 upstream wp {
2
 upstream wp {
3
-     server <YOUR_DOCKER_CONTAINER_NAME>;
3
+     server craft-wp;
4
 }
4
 }
5
 
5
 
6
 ### Redirect regular traffic to SSL
6
 ### Redirect regular traffic to SSL
8
     listen 80 default_server;
8
     listen 80 default_server;
9
     listen [::]:80 default_server;
9
     listen [::]:80 default_server;
10
 
10
 
11
-    server_name <CHANGE_ME> www.<CHANGE_ME>;
11
+    server_name craftinamerica.org www.craftinamerica.org;
12
 
12
 
13
     location / {
13
     location / {
14
         proxy_set_header    Host                 $host;
14
         proxy_set_header    Host                 $host;
26
     listen 443 ssl http2;
26
     listen 443 ssl http2;
27
     listen [::]:443 ssl http2;
27
     listen [::]:443 ssl http2;
28
 
28
 
29
-    server_name <CHANGE_ME> www.<CHANGE_ME>;
29
+    server_name craftinamerica.org www.craftinamerica.org;
30
 
30
 
31
     include snippets/letsencrypt.conf;
31
     include snippets/letsencrypt.conf;
32
     include snippets/ssl-params.conf;
32
     include snippets/ssl-params.conf;
33
 	
33
 	
34
     location / {
34
     location / {
35
-    	#blocks blank user_agents
35
+        #blocks blank user_agents
36
         if ($http_user_agent = "") { return  301 $scheme://www.google.com/; }
36
         if ($http_user_agent = "") { return  301 $scheme://www.google.com/; }
37
         
37
         
38
         proxy_set_header        Host              $host;
38
         proxy_set_header        Host              $host;

+ 5
- 5
nginx/configs/nginx.conf Прегледај датотеку

20
 
20
 
21
     access_log  /var/log/nginx/access.log  main;
21
     access_log  /var/log/nginx/access.log  main;
22
 
22
 
23
-    sendfile        on;
24
-    #tcp_nopush     on;
25
-
26
-    keepalive_timeout  65;
23
+    sendfile             on;
24
+    #tcp_nopush          on;
25
+    client_max_body_size 10M;
26
+    keepalive_timeout    65;
27
 
27
 
28
 	gzip  on;
28
 	gzip  on;
29
     gzip_vary on;
29
     gzip_vary on;
37
 
37
 
38
     # Bring over default server config
38
     # Bring over default server config
39
     include /etc/nginx/conf.d/default.conf;
39
     include /etc/nginx/conf.d/default.conf;
40
-}
40
+}

Loading…
Откажи
Сачувај