I'm using mod_userdir to set my document root to
/home/user/server/public_html/
I also setup a virtual host that will redirect for the ServerName domain.com
to
/home/user/server/public_html/domain.com/
In that vhost config I also set the document root to that same directory.
Adding a line 127.0.0.1 domain.com
to my hosts file this all works like a charm.
My problem is that if I call that url from my local network externally via
192.168.0.1/~user/domain.com/
the document root is set to /var/www
instead of /home/user/server/public_html/domain.com/
Is there a way to set the document root to the correct path in such case?