Why is Apache configuration so confusing!
I have multiple name-based virtual hosts on port 80.
I want one of those virtual hosts ("VH-1", "vh-1.localhost") to also
respond on port 8080, and to be the default host on that port (but not
others).
In other words, given the server's IP of 192.168.10.10, I want:
http://192.168.10.10
- Shows default virtual host VH-0
http://192.168.10.10:8080
- Shows virtual host VH-1
http://vh-1.localhost
- Shows virtual host VH-1
http://vh-1.localhost:8080
- Shows virtual host VH-1
http://vh-2.localhost
- Shows virtual host VH-2
http://vh-2.localhost:8080
- Don't really care, could either be VH-1 (based on the port) or
VH-2 (based on name).
- Which ever it is, though, I'd like to understand why!
What I have at the moment is something like[*]:
Listen 80
NameVirtualHost *
<VirtualHost *>
ServerName vh-0.localhost
# blah blah
</VirtualHost>
<VirtualHost *>
ServerName vh-1.localhost
# blah blah
</VirtualHost>
Listen 8080
<VirtualHost *:8080>
ServerName vh-1.localhost
# blah blah
</VirtualHost>
<VirtualHost *>
ServerName vh-2.localhost
# blah blah
</VirtualHost>
Apache gives me an error:
[error] VirtualHost *:8080 -- mixing * ports and non-* ports with
a NameVirtualHost address is not supported,
proceeding with undefined results
[*] The actual configuration is a mixture of include files, and I've
changes virtual host names and IPs to protect the innocent, so the above
is what I think it all boils down to.
--
Mark Rogers // More Solutions Ltd (Peterborough Office) // 0845 45 89 555
Registered in England (0456 0902) at 13 Clarke Rd, Milton Keynes, MK1 1LG
_______________________________________________
Peterboro mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/peterboro