Re: [Catalyst] Feasibility questions ref transition to Catalyst
On 27 December 2015 at 12:29, Tom Browderwrote: > I have several virtual hosts running under Apache 2.4 on my private Debian 7 > 64-bit server. The host websites are hand-written using some Perl 5 CGI but > are mostly static. I am currently not using mod_perl or fast CGI. All but > one of my sites use strict https. > > I am considering a move to Catalyst but would like to know: > [ .. ] > 2. Another concern is how the virtual hosts are served by Catalyst. Can > there be multiple instances of Catalyst, or do I have to do some fancy > footwork to handle virtual hosts with one instance. Late response, but this scenario is why I wrote https://metacpan.org/release/Catalyst-TraitFor-Component-ConfigPerSite - which is for handling concern 2 - allows one instance of that catalyst app to run multiple sites, although you'll need to extend it for any plugins, views or modules beyond the usual DBIC/TT standard setup. A. -- Aaron J Trevena, BSc Hons http://www.aarontrevena.co.uk LAMP System Integration, Development and Consulting ___ List: Catalyst@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/
Re: [Catalyst] Feasibility questions ref transition to Catalyst
In the end, although it's off-topic from Catalyst, I found what I was really after in apache was: FallbackResource /path/to/catalystapp_fastcgi.pl/ ...instead of the Alias to my catalyst app. As in: FastCgiExternalServer /home/username/public_html/myapp/script/myapp_fastcgi.pl -host www.mydomain.com:56000 FallbackResource /myapp/script/myapp_fastcgi.pl/ That would mean it would try and see if a file or directory of the same name as that being requested existed, and only if there was no such file or directory, would it pass the request on to my app. I.e. all existing cgis and static content are served as they ever were, and any other requests gets dealt with by the catalyst app. Things got complicated when the path and file weren't in the public_html folder however - as: FallbackResource /somethinggoeshere essentially translates to www.mydomain.com/somethinggoeshere ...so it becomes impossible to actually specify a folder outside of the public html directory. (Unless because I'm new to apache, I'm missing something?) When my Catalyst app wasn't in public_html, and was instead at /home/username/myapp/script/myapp_fastcgi.pl I used: FastCgiExternalServer /home/username/public_html/myapp_fastcgi.pl -host www.mydomain.com:56000 FallbackResource /myapp_fastcgi.pl/ I get away with the first line, because FastCgiExternalServer doesn't actually need the file mentioned to exist - only the path needs to be real. However, the FallbackResource bit didn't actually work, until I put a file called myapp_fastcgi.pl in the public_html directory. It didn't have to have anything in it - I used a blank text file, and renamed it. Bit annoying though. Don't know if I'm missing something, and there's a way of feeding a path to FallbackResource that isn't public html. - Original Message - From: Andrew To: The elegant MVC web framework Sent: Wednesday, March 02, 2016 6:14 PM Subject: Re: [Catalyst] Feasibility questions ref transition to Catalyst I've just seen something similar on page 115 of The Definitive Guide to Catalyst. I will look into this further... 'Cos atm, I've just got one directory working, but I pretty much want the entirety of public_html (all its files and subfolders, etc) back up as my static content, and I wonder if this is a way to do it...? - 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: i...@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 <catalystgr...@unitedgames.co.uk>: Just discovered something else that's pretty cool. When setting up FastCGI in Apache, you have something like: 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/ ...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 l
Re: [Catalyst] Feasibility questions ref transition to Catalyst
I've just seen something similar on page 115 of The Definitive Guide to Catalyst. I will look into this further... 'Cos atm, I've just got one directory working, but I pretty much want the entirety of public_html (all its files and subfolders, etc) back up as my static content, and I wonder if this is a way to do it...? - 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: i...@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 <catalystgr...@unitedgames.co.uk>: Just discovered something else that's pretty cool. When setting up FastCGI in Apache, you have something like: 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/ ...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: 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/ .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.brow...@gmail.
Re: [Catalyst] Feasibility questions ref transition to Catalyst
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 <catalystgr...@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: i...@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 <catalystgr...@unitedgames.co.uk>: Just discovered something else that's pretty cool. When setting up FastCGI in Apache, you have something like: 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/ ...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: 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/ .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 trig
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 <catalystgr...@unitedgames.co.uk> wrote: > Cool, =D. > > Thanks for that. > > > - Original Message - > *From:* QE :: Felix Ostmann <ostm...@qe.de> > *To:* The elegant MVC web framework <catalyst@lists.scsys.co.uk> > *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 <%2B49%20%280%29%20541%20%2F%2040666%2011> > Fax: +49 (0) 541 / 40666 22 <%2B49%20%280%29%20541%20%2F%2040666%2022> > Email: i...@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 <catalystgr...@unitedgames.co.uk>: > >> Just discovered something else that's pretty cool. >> >> When setting up FastCGI in Apache, >> you have something like: >> >> >> 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/ >> >> >> ...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: >> >> >> 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/ >> >> >> .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
Re: [Catalyst] Feasibility questions ref transition to Catalyst
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: i...@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 <catalystgr...@unitedgames.co.uk>: Just discovered something else that's pretty cool. When setting up FastCGI in Apache, you have something like: 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/ ...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: 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/ .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.brow...@gmail.com> To: "The elegant MVC web framework" <catalyst@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 <catalystgr...@unitedga
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: i...@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 <catalystgr...@unitedgames.co.uk>: > Just discovered something else that's pretty cool. > > When setting up FastCGI in Apache, > you have something like: > > > 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/ > > > ...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: > > > 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/ > > > .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.brow...@gmail.com> > To: "The elegant MVC web framework" <catalyst@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 > <catalystgr...@unitedgames.co.uk> wrote: > > > > 1. Is possible to move to Catalyst incrementally? In other words, can I > > start deploying Catalyst
Re: [Catalyst] Feasibility questions ref transition to Catalyst
Just discovered something else that's pretty cool. When setting up FastCGI in Apache, you have something like: 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/ ...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: 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/ .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.brow...@gmail.com> To: "The elegant MVC web framework" <catalyst@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 <catalystgr...@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@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@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/
Re: [Catalyst] Feasibility questions ref transition to Catalyst
On Wed, Feb 17, 2016 at 10:03 AM, Andrewwrote: > > 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@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/
Re: [Catalyst] Feasibility questions ref transition to Catalyst
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 copy and paste old code into a Catalyst Controller, and it usually works. Basically, everything is still Perl 5. For example, I haven't put anything in the Model or View folders. I'm still just reading in html templates, doing a pattern-matched-based find-and-replace to throw in the dynamic data, and then printing to the screen/browser, rather than using any of the template toolkit stuff that's encouraged. From this, I get the impression, you can use what you want from Catalyst, and ignore what you don't want to use, ... maybe it's not best practice, but it certainly appears possible, and thus may be a way of moving over incrementally. 2. Another concern is how the virtual hosts are served by Catalyst. Can there be multiple instances of Catalyst, or do I have to do some fancy footwork to handle virtual hosts with one instance. ---> 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 company. So in that sense, it all works on shared hosting. I've also been able to get one Catalyst app running at two URLs. I did have to fiddle with some Virtual Host stuff for that, - all done at the time I setup FastCGI and Plack and all of that gubbins, I've completely forgotten about after I got it working, ^_^. All running on Apache 2 by the way, if that's relevant to you, =). 3. I see the Catalyst book is several years old. Is it still reasonably current for reference? ---> I had the book for ages and hoped to learn Catalyst from it, yet found I never got round to learning from it. I found it much easier following the stuff at www.catalystframework.org/calendar/ where you can access stuff by year. Although I've just noticed 2015 isn't there, O_o...!? Anyway - I'd say the book is your basic foundation, and the advent calendars bring you up-to-date. However, I'd also say the book waffles on and on before getting to the point, whereas the online articles are short and to the point with example code and cool stuff to try, =). The book has stuff to try as you go too, I just wish it was written as succinctly as Perl in Two Hours: http://qntm.org/files/perl/perl.html Thank you for your assistance and patience. ---> As a N00b, I don't give the best advice. Just sharing some thoughts. ---> Yours, ---> Andrew. Best regards, -Tom ___ List: Catalyst@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@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/
Re: [Catalyst] Feasibility questions ref transition to Catalyst
Thanks, Denny! Best, -Tom ___ List: Catalyst@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/
Re: [Catalyst] Feasibility questions ref transition to Catalyst
Hi Tom, On Sun, 2015-12-27 at 06:29 -0600, Tom Browder wrote: > The host websites are hand-written using some Perl 5 CGI but are > mostly static. [...] > > I am considering a move to Catalyst [...] Why? If they're static sites, it would make sense to serve them as static HTML. > 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? You can re-use your static HTML documents as templates and serve them through Catalyst, but afaics there's not much point unless you're going to be making them dynamic. > 2. Another concern is how the virtual hosts are served by Catalyst. > Can there be multiple instances of Catalyst, or do I have to do some > fancy footwork to handle virtual hosts with one instance. You can definitely run multiple Catalyst applications (or multiple copies of the same Catalyst application) on a single server using fastcgi - I have 20 or so ShinyCMS installs on my server. I haven't tried the other methods. Regards, Denny ___ List: Catalyst@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/