S
S
Snitch2014-12-03 21:21:04
linux
Snitch, 2014-12-03 21:21:04

How to organize dynamic virtual hosts in Apache separately for each user?

In Apache I use mod_vhost_alias to generate virtual hosts dynamically: I
VirtualDocumentRoot /var/www/%0
just create a folder in /var/www for each site with its domain name. And everything works great.
But I would like to do something like:
VirtualDocumentRoot /home/%USERNAME%/www/%0
So that each user has a www folder in their home folder, which Apache will process in the same way as in the first case.

Is that possible? If so, how? And what if different users create folders with the same names; how Apache will behave in this case and how to get around it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mixlo, 2014-12-03
@mixlo

VirtualDocumentRoot /home/%0/www
??

M
microphone, 2014-12-03
@microphone

Dynamics - of course, you need to reread the config to run it in this case.
# HTTP
# jail way, for each profile, a separate instance of Apache is launched.
apache22_enable="YES"
# "x" profile name
apache22_profiles="x"
# "_x_" profile and config path
apache22_x_configfile="/apache22/httpd.conf"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question