I'm trying to configure awstats in a way that I have a site that is not authenticated, and another site that is authenticated.
More specifically
domain/awstats/awstats.pl?config=X shouldn't be authenticated
domain/awstats/awstats.pl?config=Y should be authenticated
after a lot of searching I haven't found any solution due to the fact that this is query-string related.
Best Answer
Off the top of my head, here's one way you could do it. Start by putting
awstats
on a virtual host that only listens to localhost...Inside that virtual host, include
RewriteRules
that translate path-based URLs into the appropriate query strings:With this in place, you can access:
Using:
But note that, at the moment, this is all available only via
localhost
. We haven't yet established external connectivity. For that, we're going to put<Location>
blocks in your main server config that will:Like this:
This is all off-the-cuff, so it's entirely possible that there are some errors here, but the basic idea is sound.