You are not logged in.
Pages: 1
Hi fellas, I am trying to set up teo different addresses on my server, www.dokoupil.biz and mail.dokoupil.biz to access different directories, i want the www to access /var/www and the mail one to access /var/squirrelmail. I do not know how to do that... I followed this howto: http://www.debuntu.org/2006/02/22/7-vir … g-apache-2
my /etc/apache2/sites-available/www.dokoupil.biz.conf
<VirtualHost www.dokoupil.biz>
ServerAdmin webmaster@localhost
#We want to be able to access the web site using www.dev.example.com or dev.example.com
ServerAlias www.dokoupil.biz
DocumentRoot /var/www
#if using awstats
#ScriptAlias /awstats/ /usr/lib/cgi-bin/
#we want specific log file for this server
CustomLog /var/log/apache2/example.com-access.log combined
</VirtualHost>
my /etc/apache2/sites-available/mail.dokoupil.biz.conf
<VirtualHost mail.dokoupil.biz>
ServerAdmin webmaster@localhost
#We want to be able to access the web site using www.dev.example.com or dev.example.com
ServerAlias mail.dokoupil.biz
DocumentRoot /var/squirrelmail
#if using awstats
#ScriptAlias /awstats/ /usr/lib/cgi-bin/
#we want specific log file for this server
CustomLog /var/log/apache2/example.com-access.log combined
</VirtualHost>
I have symlinked them both to /etc/apache2/sites-enabled/. It is figuratively driving me nuts!!! Even webmin did not help - when I tried to add virtual server at address mail.dokoupil.biz it said unknown address. When I added it manually to those configs it said:
[Wed Oct 01 15:39:30 2008] [warn] VirtualHost mail.dokoupil.biz:0 overlaps with VirtualHost www.dokoupil.biz:0, the first has precedence, perhaps you need a NameVirtualHost directive
and I do not know wht to do with it...
Thanks
PS: My server is Debian Etch, sorry, I know that it is Archlinux forum but I did not want to register myself on their forum just for this since I realised it is almost the same on every linux system.
Linux!
Offline
I'm far from an apache expert but is the following line in your vhosts.conf (or whatever its named) and uncommented
NameVirtualHost *:80
Edit: And when I say in your vhosts.conf, I don't mean within the declaration of each virtual host, but outside of them.
Last edited by kett (2008-10-01 14:22:22)
Offline
Pages: 1