These configurations will match the socket names or ports used in
the uWSGI command lines and .ini
files shown previously.
Complete (but simple) virtual server configurations are shown, with the application accessed from the root (/). For these first configurations, all requests are sent to the application, with none handled by the web server.
Listen 80 <VirtualHost *:80> <Location /> ProxyPass http://127.0.0.1:2000/ ProxyPassReverse http://127.0.0.1:2000/ </Location> </VirtualHost>
It just wouldn't be right to talk about mod_proxy without
repeating the standard warning: Don't set
ProxyRequests
to on
unless you're trying to set up a forward proxy (which
has nothing to do with Python web applications).
server { listen 80; location / { proxy_pass http://127.0.0.1:2000/; } }
Listen 80 <VirtualHost *:80> <Location /> ProxyPass unix:/tmp/helloHTTP.s|http://127.0.0.1/ ProxyPassReverse unix:/tmp/helloHTTP.s|http://127.0.0.1/ </Location> </VirtualHost>
server { listen 80; location / { proxy_pass http://unix:/tmp/helloHTTP.s:/; } }
Listen 80 <VirtualHost *:80> <Location /> ProxyPass fcgi://127.0.0.1:2001/ </Location> </VirtualHost>
server { listen 80; location / { include fastcgi_params; fastcgi_pass 127.0.0.1:2001; } }
Listen 80 <VirtualHost *:80> <Location /> ProxyPass unix:/tmp/helloFastCGI.s|fcgi://127.0.0.1/ </Location> </VirtualHost>
server { listen 80; location / { include fastcgi_params; fastcgi_pass unix:/tmp/helloFastCGI.s; } }
Listen 80 <VirtualHost *:80> <Location /> ProxyPass scgi://127.0.0.1:2002/ </Location> </VirtualHost>
server { listen 80; location / { include scgi_params; scgi_pass 127.0.0.1:2002; } }
Listen 80 <VirtualHost *:80> <Location /> ProxyPass unix:/tmp/helloSCGI.s|scgi://127.0.0.1:2002/ </Location> </VirtualHost>
server { listen 80; location / { include scgi_params; scgi_pass unix:/tmp/helloSCGI.s; } }
The third-party module which implements this is not reliable for me with httpd 2.4.
server { listen 80; location / { include uwsgi_params; uwsgi_pass 127.0.0.1:2004; } }
The third-party module which implements this is not reliable for me with httpd 2.4, and it may need minor updates to work with Unix sockets anyway.
server { listen 80; location / { include uwsgi_params; uwsgi_pass unix:/tmp/helloUWSGI.s; } }