I have setup a virtual host via virtualmin, and created a user account for the site. I then pointed the Document Root to "/home/domainuser/public_html". I have placed an index.php file within the directory, and it is never reached.
Looking through the webalizer error reports reveals that "/home/www/domain.org/" is still being checked for files.
I would like to have each domain hosted in a user's home directory. Everything appears to be setup correctly in the directives to make this so, but the changes don't appear to have any effect, even after restarting apache. I've posted my directives below, after changing the domain name. Any help would be appreciated.
[code:1] SuexecUserGroup "#514" "#507" ServerName mydomain.org ServerAlias www.mydomain.org ServerAlias webmail.mydomain.org ServerAlias admin.mydomain.org DocumentRoot /home/mydomainorg/public_html ErrorLog /home/mydomainorg/logs/error_log CustomLog /home/mydomainorg/logs/access_log combined ScriptAlias /cgi-bin/ /home/mydomainorg/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/mydomainorg/public_html> Options -Indexes IncludesNOEXEC FollowSymLinks allow from all AllowOverride All </Directory> <Directory /home/mydomainorg/cgi-bin> allow from all </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.mydomain.org RewriteRule ^(.) http://mydomain.org:20000/ [R] RewriteCond %{HTTP_HOST} =admin.mydomain.org RewriteRule ^(.) http://mydomain.org:10000/ [R] UseCanonicalName on [/code:1]
<b>snailian wrote:</b>
<div class='quote'>I have setup a virtual host via virtualmin, and created a user account for the site. I then pointed the Document Root to "/home/domainuser/public_html".
I would like to have each domain hosted in a user's home directory. </div>
Why did you have to create a user account and point the Document Root?
Virtualmin will do all this correctly and will put each domain in its own user's home.
Unless of course you have some misconfigurations
where does /home/www/domain.org come from? Do you mean /var/www ?
in the httpd.conf <virtualhost> directives is the correct IP:80 there?
is this debian or centos?
I figured out the problem. The default server settings had the automatic virtual host root pointed to /home/www/something.
The box is running CentOS 5.2.
Initially, I had set up a few virtual servers prior to installing virtualmin. While creating them through webmin, I had to create a user for each virtual server. Everything was working fine, with the exception of the location of the web pages. I've since removed those first virtual servers and users, and installed virtualmin. So it appears that the part about creating a new user for each domain is irrelevant, my apologies.
I am having a similar issue, each virtual server I have setup routes to /var/www/html/index.html (i created the index.html file to confirm it loads from this location) instead of the respective directory like /home/myusername/public_html/
The httpd.conf for a user's virtual host looks like this:
<VirtualHost xx.xx.xx.xx:80>
SuexecUserGroup "#502" "#503"
ServerName myusername.net
ServerAlias www.myusername.net
ServerAlias webmail.myusername.net
ServerAlias admin.myusername.net
DocumentRoot /home/myusername/public_html
ErrorLog /home/myusername/logs/error_log
CustomLog /home/myusername/logs/access_log combined
ScriptAlias /cgi-bin/ /home/myusername/cgi-bin/
ScriptAlias /awstats /home/myusername/cgi-bin
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/myusername/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All
</Directory>
<Directory /home/myusername/cgi-bin>
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.myusername.net
RewriteRule ^(.*) https://myusername.net:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.myusername.net
RewriteRule ^(.*) https://myusername.net:10000/ [R]
Alias /dav /home/myusername/public_html
<Location /dav>
DAV On
AuthType Basic
AuthName myusername.net
AuthUserFile /home/myusername/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
</Location>
<Files awstats.pl>
AuthName "myusername.net statistics"
AuthType Basic
AuthUserFile /home/myusername/.awstats-htpasswd
require valid-user
</Files>
</VirtualHost>
Operating system CentOS Linux 5
Webmin version 1.430
Virtualmin version 3.61.gpl (GPL)
Theme version 6.1
Kernel and CPU Linux 2.6.16-xenU on i686
I must be missing something obvious, appreciate any help.
TIA - Walter
I am having a similar issue, each virtual server I have setup routes to /var/www/html/index.html (i created the index.html file to confirm it loads from this location) instead of the respective directory like /home/myusername/public_html/
The httpd.conf for a user's virtual host looks like this:
<VirtualHost xx.xx.xx.xx:80>
SuexecUserGroup "#502" "#503"
ServerName myusername.net
ServerAlias www.myusername.net
ServerAlias webmail.myusername.net
ServerAlias admin.myusername.net
DocumentRoot /home/myusername/public_html
ErrorLog /home/myusername/logs/error_log
CustomLog /home/myusername/logs/access_log combined
ScriptAlias /cgi-bin/ /home/myusername/cgi-bin/
ScriptAlias /awstats /home/myusername/cgi-bin
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/myusername/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All
</Directory>
<Directory /home/myusername/cgi-bin>
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.myusername.net
RewriteRule ^(.*) https://myusername.net:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.myusername.net
RewriteRule ^(.*) https://myusername.net:10000/ [R]
Alias /dav /home/myusername/public_html
<Location /dav>
DAV On
AuthType Basic
AuthName myusername.net
AuthUserFile /home/myusername/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
</Location>
<Files awstats.pl>
AuthName "myusername.net statistics"
AuthType Basic
AuthUserFile /home/myusername/.awstats-htpasswd
require valid-user
</Files>
</VirtualHost>
Operating system CentOS Linux 5
Webmin version 1.430
Virtualmin version 3.61.gpl (GPL)
Theme version 6.1
Kernel and CPU Linux 2.6.16-xenU on i686
I must be missing something obvious, appreciate any help.
TIA - Walter
try manually restarting your apache after fixing the document root.