Dancer2 - Cannot deploy with Apache2 using Plack

244 Views Asked by At

I am trying to deploy Dancer2 app using Plack on Apache2. But after changing all the configurations on port 80 - it shows me directory listing instead of the application itself

Here is my running application on local:

root@dancer-cmuscheduler:/home/ADI/dancer_scheduler# plackup bin/app.psgi HTTP::Server::PSGI: Accepting connections at http://0:5000/

This runs just fine on port 5000.

However, I would like to deploy on apache2. Here is my configruations:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /data

        SetEnv DANCER_ENVIRONMENT "production"

        <Directory /var/www/cmuscheduler>
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>

        <Location />
            SetHandler perl-script
            PerlResponseHandler Plack::Handler::Apache2
            PerlSetVar psgi_app /var/www/cmuscheduler/bin/app.psgi
        </Location>

        ErrorLog  ${APACHE_LOG_DIR}/error.log
</VirtualHost>

I have been trying to debug for 4 hours now. The funny thing is there is no helpful logs in the log file associated that would nudge me in the right direction

[Thu Jul 14 02:23:14.424149 2016] [mpm_event:notice] [pid 7468:tid 140401436669824] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations [Thu Jul 14 02:23:14.424306 2016] [core:notice] [pid 7468:tid 140401436669824] AH00094: Command line: '/usr/sbin/apache2'

Please advice

0

There are 0 best solutions below