Awstats and Rails

#1
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?
 
Last edited:

mistwang

LiteSpeed Staff
#2
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.
 
#3
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

LiteSpeed Staff
#4
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.
 
#6
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

LiteSpeed Staff
#7
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. :)
 
Last edited:
Top