Install Dancer
$ perl -MCPAN -e shell cpan> install Dancer cpan> quit
Hello World
bin/app.pl
#!/usr/bin/env perl use Dancer ':syntax'; #use sharss; get '/' => sub { 'Hello, World!'; }; dance;
app.psgi
require 'bin/app.pl';
Test
Run.“Hello, World!” will be shown when you access http://localhost:3000/.perl app.psgi
Setting reverse proxy
install mod_proxy module
sudo apt-get install libapache2-mod-proxy-html sudo apt-get install libxml2-dev
Setting conf file
If you add “/” the end of ProxyPass and ProxyPass Reverse, the reverse proxy maybe don’t work.<Location "/test"> RequestHeader set request-base /var/www/something ProxyPass http://localhost:3000 ProxyPassReverse http://localhost:3000 </Location>
I stacked a little bit about it.
validation of mod_proxy
sudo a2enmod proxy sudo a2enmod proxy_http headers sudo /etc/init.d/apache2 restart