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