Hello, I guess I have big problems with my virtual hosts. I have a server, and several domain names set up so that they lead to my server. I manage them with Bind, and then with Apache I try and manage the sub-domains with a few virtual hosts. But for a few weeks everything's been a complete mess and I think that this shows that I've configured the vhosts wrong (I guess I haven't understood the theory as I should have). One of my domains only works with a subdomain ("xxx.domain1.com" works, but "domain.com" alone does not). Another one, "domain2.com", must always redirect to "foo.domain2.com", which does not work. In both cases, Firefox displays : Not Found The requested URL / was not found on this server. Here's how I've configured everything : I have a folder called "actifs", which replaces simply "sites-enabled". It's just for practical reasons, I've told in "apache2.conf" that I wanted this folder to be read, and it is. In "actifs", I have one file per domain. Each of them is, basically, made the same way : I've been told on IRC (#httpd on Freenode), talking to me as if I were a retard, that I had to put everywhere my.pretty.ip.address:80 (with my IP instead of it, obviously). So I put it everywhere. I've also been told that for each VirtualHost, I needed one DIFFERENT ServerAlias. I've done that, I'm pretty sure. Then here's my 000-default, in conf.d : I've been asked on IRC for the result of apache2ctl -S. Here it is : I've put fruits name (in French, I speak French) instead of the real domain names. As you can see, it's much more a mess than it should. How could I fix all that and make it work clean ? Thank you very much. ++
I would suggest you to completely install apache new...then make backups of your files and then start over again and configure something and see what happens.caus that is really a mess.Normally you do not need a single file for each domain.You can also have it all in one so as i did.That is much easier than 10 different files and you see the differences earlier^^.
Natashalein, thank you for your answer. I've finally decided to discover Lighttpd, and in only ONE day, I could get all my domains and subdomains working, with only 4 lines of configuration, and some regex. I think I'm gonna keep this http server /thread