VirtualHost problem

cdlsrm

Verified User
Joined
Jun 30, 2010
Messages
5
Welcome. I need to set up a *:80 in VirtualHosts, for example
<VirtualHost *:80>
...
</VirtualHost>

For all domains it works perfectly.

But when I try to do the same trick for subdomains, when I try to access it it redirects me to the main page.

Where is the problem. My OS is FreeBSD 8.0

Sincerely
 
It shouldnt it works the same way. Your subdomain must not be pointing to an ip on your server.
 
When I set <VirtualHost ip:80> It works well, but when I replace ip with * it doesn't.
It is very important to me, maybe it is because of FreeBSD 8.0 64bit. Could anyone change VirtualHosts for one of Your domains from IP to *, and restart httpd on various OS's

path to do so in FreeBSD:
virtualhost - vi /usr/local/directadmin/data/users/you/httpd.conf
restart - /usr/local/etc/rc.d/httpd restart
Maybe if I switch to Debian the problem would be solved.
 
Last edited:
I'm confused, if your domain is working, then all subdomains should be working too. Do you have named running? Do you use iptables? Do you have the correct ports for the bind service unblocked? Are you using another name server service?
 
I'm confused, if your domain is working, then all subdomains should be working too. Do you have named running? Do you use iptables? Do you have the correct ports for the bind service unblocked? Are you using another name server service?

Hehe, You should say ipfw. Iptables is most likely linux firewall.

It took me 3 days to manage this issue. DA has some messed up apache, that's why * in VirtualHosts seem not to work for subdomains. The easiest way to solve it, is to set <VirtualHost subdomain.domain.tld:80> that way, it is almost like *.

Nevertheless, Thank You all for Your help.
 
Last edited:
hi.
you should create custombuild virtualhost

Code:
cd /usr/local/directadmin/data/templates
cp -r virtual* ./custom/
cd custom
now you to have edit you files.
virtual_host.conf file is for domain
virtual_host_sub.conf file is for subdomain
 
Or simply edit them in /templates/directory.

Does anyone know why DA stopped creating SSL VirtualHosts automaticly ?

<VirtualHost ip:443> etc.
 
Back
Top