Guest User

Untitled

a guest
Feb 23rd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. ALLOWED_HOSTS = ['*']
  2.  
  3. Request repr():
  4. <WSGIRequest
  5. path:/,
  6. GET:<QueryDict: {}>,
  7. POST:<QueryDict: {}>,
  8. COOKIES:{},
  9. META:{'HTTP_ACCEPT_ENCODING': 'none',
  10. 'HTTP_CONNECTION': 'close',
  11. 'HTTP_HOST': '*.domain.com',
  12. 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.2)',
  13. 'HTTP_X_FORWARDED_FOR': '11.111.111.11',
  14. 'HTTP_X_FORWARDED_HOST': 'subdomain.domain.com',
  15. 'HTTP_X_REAL_IP': '11.111.111.11',
  16. 'PATH_INFO': u'/',
  17. 'QUERY_STRING': '',
  18. 'RAW_URI': '/',
  19. 'REMOTE_ADDR': '127.0.0.1',
  20. 'REMOTE_PORT': '51349',
  21. 'REQUEST_METHOD': 'GET',
  22. 'SCRIPT_NAME': u'',
  23. 'SERVER_NAME': '127.0.0.1',
  24. 'SERVER_PORT': '9000',
  25. 'SERVER_PROTOCOL': 'HTTP/1.0',
  26. 'SERVER_SOFTWARE': 'gunicorn/19.1.1',
  27. 'gunicorn.socket': <socket._socketobject object at 0x3877fa0>,
  28. 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x37e6050>,
  29. 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,
  30. 'wsgi.input': <gunicorn.http.body.Body object at 0x396cc50>,
  31. 'wsgi.multiprocess': False,
  32. 'wsgi.multithread': False,
  33. 'wsgi.run_once': False,
  34. 'wsgi.url_scheme': 'http',
  35. 'wsgi.version': (1, 0)}>
  36.  
  37. Host: *.domain.com
  38.  
  39. proxy_set_header Host $host;
  40.  
  41. server {
  42. listen 8000;
  43. server_name 0.0.0.0;
  44.  
  45. location / {
  46. proxy_set_header Host $host;
  47. include proxy_params;
  48. proxy_pass http://unix:/<your-path>/yourproject.sock;
  49.  
  50. }
  51. }
Add Comment
Please, Sign In to add comment