Просмотр исходного кода

Update 'nginx/configs/default.conf'

master
maeda 4 лет назад
Родитель
Сommit
fc73f5c48b
1 измененных файлов: 12 добавлений и 19 удалений
  1. 12
    19
      nginx/configs/default.conf

+ 12
- 19
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_SERVER_IP_ADDRESS>:8082;
3
+     server <YOUR_DOCKER_CONTAINER_NAME>;
4
 }
4
 }
5
 
5
 
6
 ### Redirect regular traffic to SSL
6
 ### Redirect regular traffic to SSL
10
 
10
 
11
     server_name <CHANGE_ME> www.<CHANGE_ME>;
11
     server_name <CHANGE_ME> www.<CHANGE_ME>;
12
 
12
 
13
-    # return 301 https://$host$request_uri;
14
-
15
-    # root /opt/app/public/;
16
-    # WP Test
17
-    root /var/www/html;
18
-    index index.html index.htm index.php index.nginx-debian.html;
19
-
20
     location / {
13
     location / {
21
         proxy_set_header    Host                 $host;
14
         proxy_set_header    Host                 $host;
22
         proxy_set_header    X-Real-IP            $remote_addr;
15
         proxy_set_header    X-Real-IP            $remote_addr;
37
 
30
 
38
     include snippets/letsencrypt.conf;
31
     include snippets/letsencrypt.conf;
39
     include snippets/ssl-params.conf;
32
     include snippets/ssl-params.conf;
40
-
41
-    root /var/www/html;
42
-    index index.html index.htm index.php index.nginx-debian.html;
43
-
44
-    # location / {
45
-    #    try_files $uri $uri/ /index.php;
46
-    # }
47
-
33
+	
48
     location / {
34
     location / {
35
+    	#blocks blank user_agents
36
+        if ($http_user_agent = "") { return  301 $scheme://www.google.com/; }
37
+        
49
         proxy_set_header        Host              $host;
38
         proxy_set_header        Host              $host;
50
         proxy_set_header        X-Real-IP         $remote_addr;
39
         proxy_set_header        X-Real-IP         $remote_addr;
51
         proxy_set_header        X-Forwarded-For   $proxy_add_x_forwarded_for;
40
         proxy_set_header        X-Forwarded-For   $proxy_add_x_forwarded_for;
53
         proxy_set_header        Accept-Encoding   "";
42
         proxy_set_header        Accept-Encoding   "";
54
         proxy_set_header        Proxy             "";
43
         proxy_set_header        Proxy             "";
55
 
44
 
56
-        proxy_pass          http://wp;
57
-        proxy_redirect      off;
45
+        proxy_pass              http://wp;
46
+        proxy_redirect          off;
47
+        
48
+        proxy_connect_timeout   300;
49
+        proxy_send_timeout      300;
50
+        proxy_read_timeout      300;
58
     }
51
     }
59
 
52
 
60
     location ~/\.ht {
53
     location ~/\.ht {
61
         deny all;
54
         deny all;
62
     }
55
     }
63
-}
56
+}

Загрузка…
Отмена
Сохранить