[Catalyst] nginx configuration issues

Jesse Sheidlower jester at panix.com
Sun Nov 6 20:18:38 GMT 2011


On Sat, Nov 05, 2011 at 10:30:38PM -0400, Jesse Sheidlower wrote:
> 
> I run several sites on the same server at non-root locations. Within my
> main server {  } block, I add (for example):
> 
>        # SF citations site
>        location /sf {
>             include fastcgi_params; # stock Ubuntu file; overload as necessary
>             fastcgi_param SCRIPT_NAME /sf/;
>             fastcgi_param PATH_INFO $fastcgi_script_name;
>             fastcgi_pass   unix:/tmp/sf.socket;
>        }
> 
>        location /sf/static {
>             root /usr/local/www/modules/CatSF/root;
>        }
> 
> 
> The static location thing was taken from the Advent article. However,
> it's not working; this config is trying to serve the files from
> /usr/local/www/modules/CatSF/root/sf , i.e. inserting "sf" at the end.
> What's the correct approach? 

Responding to myself here: I don't know if this is the "right" solution,
but it works to have

   location /sf/static {
           alias /usr/local/www/modules/CatSF/root/static/;
   }

instead of the suggested

           root /usr/local/www/modules/CatSF/root;

If this is the way to do it, I'll add it to the docs. If it's not, tell
me what is, and I'll do that and add _that_ to the docs :-)



More information about the Catalyst mailing list