2

I am a newbie and am in process of deploying a quick App using Strawberry Perl v5.20 Dancer2 framework on Windows 7 64-bit.

C:\xampp\apache\bin>httpd.exe -v
Server version: Apache/2.4.17 (Win32)
Apache Lounge VC11 Server built:   Oct 13 2015 10:54:13

Using the native CGI as mentioned in the Dancer Deplyoment guide the rendering is very slow [~ 4s] compared to use of plackup app.pl [~ 400ms]

Below is my working native cgi apache config :

<VirtualHost *:80>
        ServerName xyz
        DocumentRoot C:/xampp/cgi-bin/xyz/public
        ServerAdmin you@xyz.com
        <Directory "C:/xampp/cgi-bin/xyz/public">
           AllowOverride None
           Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
           Order allow,deny
           Allow from all
           AddHandler cgi-script .cgi
        </Directory>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ /dispatch.cgi$1 [QSA,L]
</VirtualHost>

Since my app requires simultaneous access and to improve the performance I am planning to shift to mod_fastcgi.

  1. Is there any change in the above config or in httpd.conf which can help me improve the performance ?

  2. Any other multi-process/threaded alternative for windows ?

  3. I have searched quite a bit and have given up. Need your help in finding out the mod_fastcgi binary for windows supporting Apache 2.4.

  4. I have tried using the one at this location, but it seems to be compiled for Apache 2.2 http://strawberryperl.com/package/kmx/mod_fastcgi/ Restarting apache with this doesn't work with the below changes.

    #LoadModule fastcgi_module modules/mod_fastcgi.so
    #<IfModule mod_fastcgi>
    #  AddHandler fastcgi-script .fcgi
    #</IfModule>
    #RewriteRule ^(.*)$ /dispatch.fcgi$1 [QSA,L]
    

Thanks a lot for your help.

  • Most of the Dancer core people don't frequent Stack Overflow. Your best bet is to head to #dancer on irc.perl.org and ask there, or point them to this question. There will be someone friendly to explain it to you there. – simbabque Mar 17 '16 at 20:25
  • Thanks @simbabque . Let me try posting on that link. – Stavan Shah Mar 19 '16 at 03:17

1 Answers1

0

This seems too obvious, but your apache code is stubbed out, you need to remove the '#'s for it to work

wgeorge
  • 281
  • 3
  • 2