Wed, 07 Feb 2018
Routing Apache through Perl Catalyst PSGI Server
Here's how you do it:
<VirtualHost *:80>
ServerName server.example.com
DocumentRoot /var/www/server
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /icons !
ProxyPass / http://localhost:5000/ keepalive=On
ProxyPassReverse / http://localhost:5000/
#RequestHeader set X-Forwarded-HTTPS "0"
</VirtualHost>
Run psgi app with Starman:
#!/bin/sh sudo starman --l :5000 /var/www/dhamma/Dhamma-Maintenance/app.psgi --daemonize --pid /var/run/dhamma_maintenance.pid --error-log /var/log/starman/error.log