Kaynağa Gözat

:recycle: updating the docker and nginx confs

cia-next
maeda 3 yıl önce
ebeveyn
işleme
c88848382e
3 değiştirilmiş dosya ile 15 ekleme ve 15 silme
  1. 6
    6
      nginx/Dockerfile
  2. 4
    4
      nginx/configs/default.conf
  3. 5
    5
      nginx/configs/nginx.conf

+ 6
- 6
nginx/Dockerfile Dosyayı Görüntüle

@@ -4,17 +4,17 @@ FROM nginx
4 4
 # COPY ./nginx/temp/index.html /opt/<path-to-project>/index.html
5 5
 
6 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 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 14
 ### Configure Nginx to Use SSL
15 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 19
 ### Move over the nginx.conf and default.config server configs
20 20
 COPY ./nginx/configs/default.conf /etc/nginx/conf.d/default.conf

+ 4
- 4
nginx/configs/default.conf Dosyayı Görüntüle

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

+ 5
- 5
nginx/configs/nginx.conf Dosyayı Görüntüle

@@ -20,10 +20,10 @@ http {
20 20
 
21 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 28
 	gzip  on;
29 29
     gzip_vary on;
@@ -37,4 +37,4 @@ http {
37 37
 
38 38
     # Bring over default server config
39 39
     include /etc/nginx/conf.d/default.conf;
40
-}
40
+}

Loading…
İptal
Kaydet