1

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?

steros
  • 121
  • 5
  • I found out that the `/var/www` comes from the default vhost configuration. There I can hard-code the appropriate DocumentRoot. But it seems it is not possible to set it according to the directory that has been called or pass the Directory as an argument. – steros Jan 27 '14 at 10:38

0 Answers0