Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 11th, 2012  |  syntax: None  |  size: 1.33 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. gunicorn via mod_proxy is redirecting outside of the project's scope, despite ProxyPassReverse
  2. <Proxy *>
  3.     Order deny,allow
  4.     Allow from all
  5. </Proxy>
  6. ProxyRequests On
  7. ProxyPass /my-project/ http://127.0.0.1:18731/ retry=0
  8. ProxyPassReverse /my-project/ http://127.0.0.1:18731/ retry=0
  9. ProxyPreserveHost On
  10. ProxyErrorOverride Off
  11.        
  12. <Proxy *>
  13.     Order deny,allow
  14.     Allow from all
  15. </Proxy>
  16. ProxyRequests On
  17. ProxyPass /my-project/ http://127.0.0.1:18731/my-project/ retry=0
  18. ProxyPassReverse /my-project/ http://127.0.0.1:18731/my-project/ retry=0
  19. ProxyPreserveHost On
  20. ProxyErrorOverride Off
  21.        
  22. <VirtualHost *:80>
  23. ServerName example.com
  24. UseCanonicalName On
  25. ServerAdmin webmaster@localhost
  26.  
  27. LogLevel warn
  28. CustomLog /var/log/apache2/example.com/access.log combined
  29. ErrorLog /var/log/apache2/example.com/error.log
  30. ServerSignature On
  31.  
  32. Alias /media/ /home/example/example.com/pysrc/project/media/
  33.  
  34. ProxyPass /media/ !
  35. ProxyPass / http://127.0.0.1:18731/
  36. ProxyPassReverse / http://127.0.0.1:18731/
  37. ProxyPreserveHost On
  38. ProxyErrorOverride Off
  39. </VirtualHost>
  40.        
  41. ProxyPreserveHost On
  42.  
  43. <Location "/my-project/">
  44.     ProxyPass http://127.0.0.1:18173/my-project/
  45.     ProxyPassReverse http://127.0.0.1:18173/my-project/
  46.     RequestHeader set SCRIPT_NAME /my-project
  47.     RequestHeader set X-FORWARDED-PROTOCOL ssl
  48.     RequestHeader set X-FORWARDED-SSL on
  49. </Location>