Expand
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Deployment / SharedHosting.pod
CommitLineData
1d2376f3 1=head1 NAME
2
3Catalyst::Manual::Deployment::SharedHosting - Deploying Catalyst on Shared Hosting
4
5=head1 Catalyst on shared hosting
6
7So, you want to put your Catalyst app out there for the whole world to
8see, but you don't want to break the bank. There is an answer - if you
9can get shared hosting with FastCGI and a shell, you can install your
10Catalyst app in a local directory on your shared host. First, run
11
12 perl -MCPAN -e shell
13
14and go through the standard CPAN configuration process. Then exit out
15without installing anything. Next, download the latest L<local::lib>
16package and follow it's 'bootstrap' instructions to get it installed
17and the local configuration added to your C<< ~/.bashrc >>.
18
19Now log out, then back in again (or run C<". .bashrc"> if you
20prefer).
21
22Now you can install the modules you need using CPAN as normal; they
23will be installed into your local directory, and perl will pick them
24up. Finally, change directory into the root of your virtual host and
25symlink your application's script directory in:
26
27 cd path/to/mydomain.com
28 ln -s ~/lib/MyApp/script script
29
30And add the following lines to your .htaccess file (assuming the server
31is setup to handle .pl as fcgi - you may need to rename the script to
32myapp_fastcgi.fcgi and/or use a SetHandler directive):
33
34 RewriteEngine On
35 RewriteCond %{REQUEST_URI} !^/?script/myapp_fastcgi.pl
36 RewriteRule ^(.*)$ script/myapp_fastcgi.pl/$1 [PT,L]
37
38Now C<http://mydomain.com/> should now Just Work. Congratulations, now
2d62c370 39you can tell your friends about your new website.
1d2376f3 40
41=head1 AUTHORS
42
43Catalyst Contributors, see Catalyst.pm
44
45=head1 COPYRIGHT
46
47This library is free software. You can redistribute it and/or modify it under
48the same terms as Perl itself.
49
50=cut
51