Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My Goal is to let client connect through https connection but apache serve it to my application which is running on same server over http. Here is my minimalistic apache configuration file (for incoming http requests i am simply redirecting all request to https):


LoadModule headers_module /usr/lib/apache2/modules/

  # Admin email, Server Name (domain name) and any aliases
  RequestReadTimeout header=90 body=90

  DocumentRoot /path/to/my/project
  LogLevel warn
  WSGIDaemonProcess abc_ssl processes=2 maximum-requests=500 threads=10
  WSGIProcessGroup abc_ssl
  WSGIScriptAlias / /path/to/my/project.wsgi
  WSGIApplicationGroup %{GLOBAL}

  SSLEngine on
  SSLCertificateFile /home/django/.ssh/abc.crt
  SSLCertificateKeyFile /home/django/.ssh/server.key
  SSLCertificateChainFile /home/django/.ssh/

  RequestHeader set X-FORWARDED-SSL "on"
  RequestHeader set X-FORWARDED_PROTO "https"
  ProxyRequests off
  ProxyPreserveHost on

  <Location /stream/>
      Order Allow,Deny
      Allow from All

  ProxyPass /stream/
  ProxyPassReverse /stream/


Clearly the gunicorn is running and listening on

2013-08-31 05:05:51 [15025] [INFO] Starting gunicorn 0.17.2
2013-08-31 05:05:51 [15025] [INFO] Listening at: (15025)
2013-08-31 05:05:51 [15025] [INFO] Using worker: eventlet
2013-08-31 05:05:51 [15044] [INFO] Booting worker with pid: 15044
2013-08-31 05:05:51 [15045] [INFO] Booting worker with pid: 15045
2013-08-31 05:05:51 [15046] [INFO] Booting worker with pid: 15046

But on browser i can only see NetworkError: 404 NOT FOUND - Please help me i am stuck, really appreciate that.

share|improve this question
Are you trying to use mod_wsgi, or proxy to the running gunicorn instance? With both mod_wsgi and mod_proxy set to handle the request, I'm not sure which one "wins". Check the gunicorn access log to determine whether the request is making it there or if mod_wsgi is preventing the proxy configuration from functioning. – Shane Madden Aug 31 '13 at 5:35
Enable access log and error log in gunicorn, see if your requests to /stream really hit the gunicorn first. – Raymond Tau Aug 31 '13 at 14:19

1 Answer 1

Oopss! it was a silly mistake. The ProxyPass and ProxyPassReverse should be:

ProxyPass /stream/ #<-- was missing /stream/ here
ProxyPassReverse /stream/
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.