keep "stats" and other icon folders outside of the public_html

Pardon if this was asked before, I wanted to know how I can keep my public_html folder absolutely clean and lean comprising my site files only. Virtualmin creates these default folders:
awstats-icon awstatsicons icon stats

I’d prefer to keep stats and other icon folders outside of the public_html folder.

thanks alot!


These files and symbolic links are used by “AWStats” so if you don’t need this feature you simply can remove the feature from the domain and safely remove folders/symbolic links.

Best Regards, Peter Knowles TPN Solutions

Phone: 604-782-9342
Skype: tpnsupport

Ask me about my new support plans which include a FREE copy of Virtualmin Pro!!!

Thanks… But I DO WANT to USE AWStats, Can I not have these folders outside of my Public_html folder?
There must be some AWStats config file where we can change the default path behavior for this ?

That’d be somewhat tricky. You’d need an additional Directory section added to each VirtualHost in the Apache configuration. You could do that in Server Templates (you can add arbitrary Apache configuration for each new VirtualHost with Server Templates in the Apache section)…but, you’d also need the Virtualmin AWStats module to know about that, which it doesn’t look like it is configurable in that way. So, some code would need to be written in virtualmin-awstats.

That happens in this function:

sub get_htmldir { return &virtual_server::public_html_dir($_[0]); }

Not sure if it’d be as simple as making a new config option for where you want it to go, and returning that if it’s set…but, might be. That would only be 2 additional lines of code and one config file directive, I think, if it would work that way. But, would probably also require some additional stuff in the module to setup that Directory section.