Stats for alias virtual servers

Hi,
I have a wordpress installation with multi-domain plugin, on a “top-level” virtualmin server.
To create a new website I add a domain in wordpress, and create a server alias in virtualmin to point to my top-level domain.
When a user visit the alias he is visiting an independent website from the top-level one. Only the core wordpress files are shared.

My issue is that i would like to have stats for the alias.

So, is there a way to generate stats for domain alias, or is there another way to point new domains to this top level domain with multi-domain wordpress ?
Thanks

up

up

up

Isn’t it the right place for this question ?

Howdy,

Unfortunately, alias domains are considered the same as the parent, from the standpoint of Apache. There is only one log file for all of them.

There may, however, be a way to add the domain name into the logs, though I’m not sure how to do that off the top of my head. I’m also not sure if the stats collection tools can use that to distinguish them. But if it were possible to accomplish that, that’s what I’d be looking into, how to include the domain name in the logs, and how to get the stats collection tools to use that domain to distinguish the requests.

-Eric

Hi Eric,
Thank you for your answer.
While looking how to implement your advice (which I am sure should work), I found a simpler solution :
Create a sub server instead of an alias. The reason I didn’t do it in the first place was because the domain must redirect to the parent server “public_html” folder. But the solution is to replace the public_html from the sub-server with a symbolic link to the parent public_html.
Thank you again, you answer helped me to figure out this solution.

Howdy,

Glad to hear you got things working!

Another alternative, would be to setup an actual redirect, rather than using a symlink.

You could do that using a .htaccess file. Or, Virtualmin has a method built in for handling redirects, you can do that in Server Configuration -> Website Redirects.

-Eric