LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Ruby/Rails (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=20)
-   -   Awstats and Rails (http://www.litespeedtech.com/support/forum/showthread.php?t=656)

thijs 10-06-2006 06:09 AM

Awstats and Rails
 
I'm setting up the awstats integration, great stuff. I'm running into a problem though.

I want to place the awstats folder outside of the document root because the app is deployed by Capistrano and the awstats folder does not stay in the same place.

It gives this error:

[config:vhost:test:awstats] AWStats working directory: /home/test/awstats/ is not inside virtual host root: (null)/home/test/app/current/, AWStats integration is disabled.

Is it possible to put the folder outside of the document root and map it with an alias?

mistwang 10-06-2006 08:25 AM

It is not possible to turn this security feature off with current release.
However, you can change your vhroot from "/home/test/app/current/" to "/home/test", and adjust the path to rails application if it is relative to the vhroot.

thijs 10-09-2006 02:07 AM

Thanks, but that wouldn't be a really clean solution.

It would be great if this security constraint could be loosened in the next release.

mistwang 10-09-2006 01:28 PM

Security is the top priority here, the risk is too high to do that.
Another solution is to set AWStats working directory to /home/test/app/current/awstats/, and have Capistrano backup and restore it automatically. I think it is doable.

dlhhyct 10-10-2006 07:33 AM

how about ln?
 
ln -s /anywhere/you/want /home/test/app/current/awstats ?

thijs 12-17-2006 08:23 AM

Sorry, to bring this up again but it's a bit of an annoyance.

Are there any plans at the moment to allow the awstats directory outside of the public root?

What exactly are the security problems in doing this. Are there security issues with aliasing an external directory in general?

mistwang 12-17-2006 11:30 AM

You can change your vhost root to "/home/test/", set document root to "/home/test/app/current/", change the "Rails" context location to "/home/test/app/current/" as well.
This way, you can set awstats working directory to a real directory at "/home/test/awstats".

You need to instantiate the vhost configuration first if you are using the vhost template.

Just a simple configuration change. :)

thijs 12-18-2006 12:55 AM

Oh, I'm sorry. I misunderstood your reply. This works just fine.


All times are GMT -7. The time now is 11:19 AM.