remove trailing whitespace
[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
5abded07 7So, you want to put your Catalyst application out there for the whole
8world to see, but you don't want to break the bank. There is an answer -
9if you can get shared hosting with FastCGI and a shell, you can install
10your Catalyst app in a local directory on your shared host. First, run
1d2376f3 11
12 perl -MCPAN -e shell
13
5abded07 14and go through the standard CPAN configuration process. Then exit
1d2376f3 15without installing anything. Next, download the latest L<local::lib>
5abded07 16package and follow its 'bootstrap' instructions to get it installed
1d2376f3 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
5abded07 22Now you can install the modules you need using CPAN as normal; they will
23be installed into your local directory, and Perl will pick them up.
24Finally, change into the root directory of your virtual host, and
25symlink your application's script directory:
1d2376f3 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
7ce05098 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