[Catalyst] Feasibility questions ref transition to Catalyst

Andrew catalystgroup at unitedgames.co.uk
Wed Mar 2 15:55:59 GMT 2016


I heard nginx is what I should be using,
yet having an apache server makes it difficult to setup!?

I gather if I ever ditch my CentOS & Apache server for Amazon's cloud hosting, it's easy enough to get Ubuntu and Nginx and stuff... (I'm speaking vaguely, as I have little idea what I'm talking about, ^_^. I'm a newbie to Catalyst, and all of this...which is why I was pleasantly surprised to find FastCGI and Plack allowed me to get a Catalyst web app going on my existing Apache server relatively easily).
  ----- Original Message ----- 
  From: Chris Welch 
  To: The elegant MVC web framework 
  Sent: Wednesday, March 02, 2016 10:33 AM
  Subject: Re: [Catalyst] Feasibility questions ref transition to Catalyst


  I know you folks are talking about Apache, but I've used this for nginx for static content if it helps anyone (I think I'm an nginx convert now mainly because, it's extremely simple for a relative Linux newbie like me):


  location /robots.txt {
    alias /path/to/robots.txt;
    expires 30d;
  }


  On 2 March 2016 at 10:24, Andrew <catalystgroup at unitedgames.co.uk> wrote:

    Cool, =D.

    Thanks for that.

      ----- Original Message ----- 
      From: QE :: Felix Ostmann 
      To: The elegant MVC web framework 
      Sent: Wednesday, March 02, 2016 10:01 AM
      Subject: Re: [Catalyst] Feasibility questions ref transition to Catalyst


      Uh, i guess in some old wiki is that already mentioned. We use this for our static content:


      Alias /static/ /path/to/static/directory
      Alias / /path/to/myapp_fastcgi.pl/


      And in our app we use Static::Simple with the same directory. So while developing only with the buildin server all works fine and later apache serves the static content and all works fine :)


      Mit freundlichen Grüßen
      Felix Ostmann


      _________________________________________________

      QE GmbH & Co. KG
      Martinistraße 3
      49080 Osnabrück
      Deutschland

      Tel.: +49 (0) 541 / 40666 11
      Fax: +49 (0) 541 / 40666 22
      Email: info at qe.de
      Web: www.qe.de


      Unsere Geschäftszeiten:

      Montag bis Freitag von 8 bis 16 Uhr

      Firmensitz: Osnabrück
      AG Osnabrück - HRA 200252
      Steuer-Nr.: 66/204/54104
      Ust-IdNr.: DE814737310

      Komplementärin:
      QE24 GmbH
      AG Osnabrück - HRB 200359
      Geschäftsführer: Ansas Meyer
      _________________________________________________


      Die in dieser Email enthaltenen Informationen sind vertraulich
      zu behandeln und ausschließlich für den Adressaten bestimmt.
      Jegliche Veröffentlichung, Verteilung oder sonstige in diesem
      Zusammenhang stehende Handlung wird ausdrücklich untersagt.


      2016-03-02 8:39 GMT+01:00 Andrew <catalystgroup at unitedgames.co.uk>:

        Just discovered something else that's pretty cool.

        When setting up FastCGI in Apache,
        you have something like:

        <IfModule mod_fastcgi.c>
        FastCgiExternalServer
        /home/username/public_html/myapp/script/myapp_fastcgi.pl -host
        www.mydomain.com:55900
        Alias / /home/username/public_html/myapp/script/myapp_fastcgi.pl/
        </IfModule>

        ...in your virtual host configuation.
        (Because I have CPanel on my Apache server, I'm not editing the httpd.conf
        file directly. Rather the httpd.conf file links to some include files, so I
        just edit the include files.)

        I realised the Alias bit, was making any URL from the domain name, go to the
        Catalyst Web App.
        However.... I had a few old CGIs I wanted to run.
        I played about a bit, trying to copy and paste the CGI code into a new
        Catalyst Controller... but I thought: "This is too much work".

        The CGIs I wanted to run were in a directory - let's pretend the directory
        was literally called "directory".
        I added a new Alias line to this part of the Apache configuration:

        <IfModule mod_fastcgi.c>
        FastCgiExternalServer
        /home/username/public_html/myapp/script/myapp_fastcgi.pl -host
        www.mydomain.com:55900
        Alias /directory /home/username/public_html/directory
        Alias / /home/username/public_html/myapp/script/myapp_fastcgi.pl/
        </IfModule>

        .....Now...if the url is www.mydomain.com/directory it goes to the directory
        folder in my public_html folder, and serves it just as apache always did,
        including running the index.pl file I had there - a cgi perl script no less!
        Everything else starting with www.mydomain.com gets sent to my new Catalyst
        Web App.

        In short - you can setup apache aliases, to still run some CGIs in specific
        places, while all other URLs run your new Catalyst Web App, =).

        That means you can have old CGI scripts and your new Catalyst web app,
        running at the same domain name.
        As long as there's no conflict of names. I.e. any Catalyst subroutine
        designed to be triggered by the 'directory' path, won't get triggered, as
        you've redirected all such requests to your directory folder instead.

        I simply added a one line alias to achieve this. If there are better ways to
        run your old CGIs on the same server as your new Catalyst app, I'm happy to
        hear suggestions, =).

        One idea that popped into my head was to maybe setup a subdomain that isn't
        setup with fastcgi, and have all your old CGIs at the sub domain, running as
        they normally would, on what's a normal apache subdomain. And then have your
        Catalyst web app running at the normal web domain.
        So if your CGIs were part of your old website,
        you could have your new catalyst website at http://www.mydomain.com and your
        old cgi website at http://old.mydomain.com
        Then you wouldn't have the conflict of names problem.
        http://www.mydomain.com/directory
        and
        http://old.mydomain.com/directory
        ...could both give different responses.

        Some food for thought, =).

        Yours,
        Andrew.




        ----- Original Message -----
        From: "Tom Browder" <tom.browder at gmail.com>
        To: "The elegant MVC web framework" <catalyst at lists.scsys.co.uk>
        Sent: Wednesday, February 17, 2016 8:20 PM
        Subject: Re: [Catalyst] Feasibility questions ref transition to Catalyst


        On Wed, Feb 17, 2016 at 10:03 AM, Andrew
        <catalystgroup at unitedgames.co.uk> wrote:
        >
        > 1.  Is possible to move to Catalyst incrementally?  In other words, can I
        > start deploying Catalyst using at least some of my existing static code?
        >
        > ---> I'm new to Catalyst, and have found, although as a framework, it sets
        > up a structure in terms of folders and where scripts are, I can pretty
        much
        ...

        Good information, Andrew--thanks!

        > ---> As a n00b, forgive me for not being sure what you mean by virtual
        > hosts. I've managed to get everything working on a VPS from a web hosting

        What I meant was I run multiple hosts (known as virtual hosts) on a
        single instance of Apache on a single server.  Your operation on a
        shared host is similar, so your answer was helpful.

        Thanks so much.

        Best,

        -Tom

        _______________________________________________
        List: Catalyst at lists.scsys.co.uk
        Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
        Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
        Dev site: http://dev.catalyst.perl.org/


        _______________________________________________
        List: Catalyst at lists.scsys.co.uk
        Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
        Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
        Dev site: http://dev.catalyst.perl.org/





--------------------------------------------------------------------------


      _______________________________________________
      List: Catalyst at lists.scsys.co.uk
      Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
      Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
      Dev site: http://dev.catalyst.perl.org/



    _______________________________________________
    List: Catalyst at lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/






------------------------------------------------------------------------------


  _______________________________________________
  List: Catalyst at lists.scsys.co.uk
  Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
  Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
  Dev site: http://dev.catalyst.perl.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/catalyst/attachments/20160302/51d9f0bb/attachment.htm>


More information about the Catalyst mailing list