whiteperl051 has asked for the wisdom of the Perl Monks concerning the following question:

I'm looking into creating a Windows Desktop App/server with Apache for Windows and Strawberry Perl.

The way it would work is that I redistribute Apache with Strawberry Perl with my Perl scripts which are the app. When installing my App on a Windows PC it acts like a web server serving up web pages. My app will be working like a web site. I'm planning on creating a media server. Users install it on their PC's and media is served through a web browser to their PC's or other devices.

If I understand the Apache license correctly then I can redistribute Apache in this manner? My application will be free.

I've tried other solutions like Mojolicious but Apache + Strawberry Perl seems to be the most stable and practical solution. Can anybody see any major issues in going this route? (Apache + Strawberry Perl) I would hate to put in many hours on this just to find it is not practical.

  • Comment on Redistributable Apache Web Server with Strawberry Perl - Practical?

Replies are listed 'Best First'.
Re: Redistributable Apache Web Server with Strawberry Perl - Practical?
by Discipulus (Canon) on Mar 27, 2017 at 09:40 UTC
    Hello whiteperl051,

    is Apache a real need? if you need to run a microwebsite embed into a portable StrawberryPerl distro many other options are available: Starman Plackup and even other frameworks offers the possibility to run micro webserver:

    I bookmarked a oneliner by YourMother that goes like:

    plackup -p 5000 -MPlack::App::Directory -e 'Plack::App::Directory->new +({root => q{.}})->to_app'

    PS see also Simple http server one-liner for some static files? and Webserver Oneliner

    I suspect that doing this way will be simpler than with an entire Apache installation.

    Spend your time investigating in the security implications: accepts only from localhost for example.

    You can modify the portableshell.bat that comes with Strawberry portable installation and launch directly the webserver and finally start http://127.0.0.1:5000 to open the page in the default browser.

    CitrusPerl is another option to create a specific Perl distribution.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: Redistributable Apache Web Server with Strawberry Perl - Practical?
by afoken (Chancellor) on Mar 28, 2017 at 04:35 UTC

    Discipulus++ is right, for light to medium load, a Perl-based web server should be sufficient.

    Another option is to use XAMPP. It has its own set of odds, but you get a working set of Apache, MariaDB (MySQL fork), PHP, Perl, Mercury Mail, FileZilla, Tomcat, OpenSLL, and a custom control panel for all of that.

    I don't like the fact that it installs all of the bundled software by default, filling the machine with a lot of software that may be a security risk. I also miss any kind of update mechanism. It's quite common to find Windows machines with ancient XAMPP versions full of vulnerable software versions. Also, I think that MySQL is one of the worst RDBMS, right after MS SQL Server.

    Nevertheless, XAMPP is a very quick way to get a working web environment on a Windows PC, similar to what you would get at a shared hosting service (Apache, MySQL, PHP, Mail, FTP, and maybe Perl). And unlike some shared hosting services, XAMPP uses quite recent versions.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      Hmm,

      Weird

      currently XAMPP says it distributes "Strawberry Perl 7.0.56 Portable" --- yeah, sure, that is real release

      that exists not

        Yepp, I've seen that, too. One of the odds of XAMPP. My guess is that some s/5\.\d+\./7.0./g intended to update PHP 5.x to PHP 7.0 in the docs went wrong. Oh well, such things happen, but they should not.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: Redistributable Apache Web Server with Strawberry Perl - Practical?
by Anonymous Monk on Mar 27, 2017 at 22:46 UTC
    "I've tried other solutions like Mojolicious but Apache + Strawberry Perl seems to be the most stable and practical solution."

    Seems to be ... or actually is. If you can show that it is, then please do so but otherwise you are potentially spreading false information, at your own expense.