These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Wrong Site on the new forum.
For some reason the virtual hosts wont work. and all requests goes to the same site. (/var/www/)
i have checked the module config specified in the documentation (http://www.virtualmin.com/documentation/web/troubleshooting). Thats not it. I am guessing the problem is some where in here (Directives and settings for new websites):
ServerName ${DOM} ServerAlias www.${DOM} DocumentRoot ${HOME}/public_html ErrorLog /var/log/virtualmin/${DOM}_error_log CustomLog /var/log/virtualmin/${DOM}_access_log combined ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory ${HOME}/public_html> Options -Indexes +IncludesNOEXEC +FollowSymLinks allow from all AllowOverride All </Directory> <Directory ${HOME}/cgi-bin> allow from all </Directory>
and this is the finaly output for one of the domains (/etc/apache2/sites-available/pockettech.se.conf):
SuexecUserGroup "#1002" "#1002" ServerName pockettech.se ServerAlias www.pockettech.se ServerAlias webmail.pockettech.se ServerAlias admin.pockettech.se DocumentRoot /home/pockettech/public_html ErrorLog /var/log/virtualmin/pockettech.se_error_log CustomLog /var/log/virtualmin/pockettech.se_access_log combined ScriptAlias /cgi-bin/ /home/pockettech/cgi-bin/ ScriptAlias /awstats /home/pockettech/cgi-bin DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/pockettech/public_html> Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI allow from all AllowOverride All AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/pockettech/fcgi-bin/php5.fcgi .php FCGIWrapper /home/pockettech/fcgi-bin/php5.fcgi .php5 </Directory> <Directory /home/pockettech/cgi-bin> allow from all </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.pockettech.se RewriteRule ^(.*) https://pockettech.se:20000/ [R] RewriteCond %{HTTP_HOST} =admin.pockettech.se RewriteRule ^(.*) https://pockettech.se:9999/ [R] RemoveHandler .php RemoveHandler .php5 IPCCommTimeout 31 <Files awstats.pl> AuthName "pockettech.se statistics" AuthType Basic AuthUserFile /home/pockettech/.awstats-htpasswd require valid-user </Files> Alias /dav /home/pockettech/public_html Alias /pipermail /var/lib/mailman/archives/public
Howdy,
In your pockettech.se.conf file, there should be a "VirtualHost" tag at the very top that looks something like this:
VirtualHost 1.2.3.4:80
Do you see something like that in there? It should be the first line of that file.
Whatever IP address is listed there, there should be a corresponding "NameVirtualHost 1.2.3.4:80" line in /etc/apache2/apache2.conf.
So, first off, you'd want to make sure that IP address matches the IP address on your server. And then second, you'd want to make sure that line exists in both .conf files.
-Eric
well in the pockettech.se.conf file:
so it's present as a wild card.
and in apache2.conf:
The server is conf just as the virtualmin install.sh script left it. but i tried to change the wild card to the server IP ... but it didn't change anything.