瀏覽代碼

serving static files

laps-staging
toj 2 年之前
父節點
當前提交
2ebc16a6dd
共有 2 個檔案被更改,包括 8 行新增37 行删除
  1. 3
    0
      docker-compose.yml
  2. 5
    37
      nginx/configs/default.conf

+ 3
- 0
docker-compose.yml 查看文件

@@ -8,9 +8,12 @@ services:
8 8
         image: proxy-nginx
9 9
         container_name: reverse-proxy
10 10
         ports:
11
+            - 3000:3000
11 12
             - 80:80
12 13
             - 443:443
13 14
         restart: always
15
+        volumes:
16
+            - /opt/staging/siimee.git/frontend/dist:/home/siimee
14 17
         networks:
15 18
             - staging_network
16 19
 

+ 5
- 37
nginx/configs/default.conf 查看文件

@@ -2,43 +2,17 @@
2 2
 upstream js {
3 3
         server js-wp;
4 4
 }
5
-upstream laps {
6
-        server laps-wp;
7
-}
8
-
9 5
 server {
10
-	listen		80;
11
-	listen		[::]:80;
12
-	server_name	jeffreysmithillustrator.com www.jeffreysmithillustrator.com;
13
-	
6
+	listen		3000;
14 7
 	location / {
15
-		#blocks blank user_agents
16
-                if ($http_user_agent = "") { return  301 $scheme://www.google.com/; }
17
-
18
-	        proxy_set_header    Host                 $server_name;
19
-	        proxy_set_header    X-Real-IP            $remote_addr;
20
-	        proxy_set_header    X-Forwarded-For      $proxy_add_x_forwarded_for;
21
-		proxy_set_header    X-Forwarded-Proto    $scheme;
22
-
23
-		proxy_pass          http://js;
24
-		proxy_redirect      off;
25
-
26
-		proxy_connect_timeout   300;
27
-                proxy_send_timeout      300;
28
-                proxy_read_timeout      300;
8
+		root                /home/siimee;
9
+		index               index.html;		
29 10
 	}
30
-
31
-        location ~/\.ht {
32
-                deny all;
33
-        }
34
-
35 11
 }
36
-
37 12
 server {
38 13
 	listen		80;
39 14
 	listen		[::]:80;
40
-	server_name	staging.laprintmaking.com;
41
-	
15
+	server_name	jeffreysmithillustrator.com www.jeffreysmithillustrator.com;
42 16
 	location / {
43 17
 		#blocks blank user_agents
44 18
                 if ($http_user_agent = "") { return  301 $scheme://www.google.com/; }
@@ -48,17 +22,11 @@ server {
48 22
 	        proxy_set_header    X-Forwarded-For      $proxy_add_x_forwarded_for;
49 23
 		proxy_set_header    X-Forwarded-Proto    $scheme;
50 24
 
51
-		proxy_pass          http://laps;
25
+		proxy_pass          http://js;
52 26
 		proxy_redirect      off;
53 27
 
54 28
 		proxy_connect_timeout   300;
55 29
                 proxy_send_timeout      300;
56 30
                 proxy_read_timeout      300;
57 31
 	}
58
-
59
-        location ~/\.ht {
60
-                deny all;
61
-        }
62
-
63 32
 }
64
-

Loading…
取消
儲存