浏览代码

Correct proxy IP in nginx config

master
David Winterbottom 11 年前
父节点
当前提交
30b4e4f493
共有 3 个文件被更改,包括 39 次插入2 次删除
  1. 1
    1
      sites/demo/deploy/nginx/demo.conf
  2. 37
    0
      sites/demo/settings_docker.py
  3. 1
    1
      sites/sandbox/deploy/nginx/latest.conf

+ 1
- 1
sites/demo/deploy/nginx/demo.conf 查看文件

@@ -2,7 +2,7 @@ server {
2 2
     listen 80;
3 3
     server_name demo.oscarcommerce.com demo.oscar.tangentlabs.co.uk;
4 4
 
5
-    set_real_ip_from 192.168.126.50;
5
+    set_real_ip_from 192.168.125.252;
6 6
     real_ip_header X-Forwarded-For;
7 7
 
8 8
     # Ensure only one domain

+ 37
- 0
sites/demo/settings_docker.py 查看文件

@@ -0,0 +1,37 @@
1
+USE_LESS = False
2
+COMPRESS_ENABLED = False
3
+
4
+HAYSTACK_CONNECTIONS = {
5
+    'default': {
6
+        'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
7
+        'URL': u'http://127.0.0.1:8983/solr',
8
+        'INCLUDE_SPELLING': True
9
+    },
10
+}
11
+
12
+CACHES = {
13
+    'default': {
14
+        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
15
+        'LOCATION': '127.0.0.1:11211',
16
+    }
17
+}
18
+
19
+SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
20
+
21
+TEMPLATE_LOADERS = (
22
+    ('django.template.loaders.cached.Loader', (
23
+        'django.template.loaders.filesystem.Loader',
24
+        'django.template.loaders.app_directories.Loader',
25
+    )),
26
+)
27
+
28
+DATABASES = {
29
+    'default': {
30
+        'ENGINE': 'django.contrib.gis.db.backends.postgis',
31
+        'NAME': 'oscar_demo',
32
+        'USER': '',
33
+        'PASSWORD': '',
34
+        'HOST': '127.0.0.1',
35
+        'PORT': '',
36
+    },
37
+}

+ 1
- 1
sites/sandbox/deploy/nginx/latest.conf 查看文件

@@ -2,7 +2,7 @@ server {
2 2
     listen 80;
3 3
     server_name sandbox.oscar.tangentlabs.co.uk latest.oscarcommerce.com;
4 4
 
5
-    set_real_ip_from 192.168.126.50;
5
+    set_real_ip_from 192.168.125.252;
6 6
     real_ip_header X-Forwarded-For;
7 7
 
8 8
     # Ensure only one domain

正在加载...
取消
保存