[Catalyst] URL and myapp_cgi or myapp_fastcgi mapping.
Sébastien Wagener
sebastien.wagener at gmail.com
Fri May 4 16:52:42 GMT 2007
On Fri, 2007-05-04 at 20:55 +0530, Dister Kemp wrote:
> Hi there,
>
> I am just getting exposed to the various Catalyst modules and stuff.
> I have finally succeeded in setting up my Apache server with FastCGI
> support to talk to myapp_fastcgi.pl server. Though there is a slight
> hitch, I dont know if I am missing something or totally in the wrong
> direction. Please lend in your inputs.
> This is what I am doing.
>
> Apache directive in my httpd.conf as,
> Alias /myapp/ /tmp/myapp/root/
Try:
Alias /myapp/ /tmp/myapp/root/\/
If it works, do not ask me why it works, i've never found out ;)
N.B. I prefer not to put this "virtual" directory into /tmp, you could
get security problems if that directory exists in reality.
> FastCgiExternalServer /tmp/myapp/root/ -host 127.0.0.1:3000
>
> I am able to view the root page of myapp from the browser like
> http://127.0.0.1/myapp/
>
> But what I would like to also do is that,
> http://127.0.0.1/myapp/admin/login/
> http://127.0.0.1/myapp/admin/logout/
> http://127.0.0.1/myapp/generic/login/
> http://127.0.0.1/myapp/generic/logout/
> ...
I guess that under your configuration
http://127.0.0.1/myappp/admin/foo/admin/login displays the desired page.
>
> How to make myapp_fastcgi.pl server take URL's from the browser (via Apache!)
>
> Also, forget fastcgi, how would this be possible under normal cgi.
> Tried with myapp_cgi.pl, but it does not take any arguments.
If you have a script myapp.cgi, you should be able to access
http://127.0.0.1/myapp.cgi/admin/login
So if you can tell apache that the file /path/to/htdocs/myapp is a CGI
script, you have the configuration you wanted. But I would need to have
a closer look at the apache help to accomplish this. You may also use
mod_rewrite.
I found the catalyst debugging output and $ENV{PATH_INFO} quite useful
during debugging this kind of problem.
>
> All your pointers are welcome.
I hope I could help you
Sébastien
>
>
> Many Thanks
> Dister.
>
More information about the Catalyst
mailing list