I have a web server using Apache 2.4.10
.
Let's assume I have several domain name :
www1.example.com.
www2.example.com.
www3.example.com.
I want my web server to be only contacted using these domain names.
This mean that I don't want people connecting to my server using HTTP by typing my IP address, or using another domain name (let's assume there is a lot of wwwX.duplicate-example.com
created by another person and pointing to my IP).
At least, I want them to connect to a default 404 page I'll set under /var/www/404/index.html
.
At this moment, I can run my 3 wwwX.example.com.
website with separate page using VirtualHost :
DocumentRoot "/www/www1"
ServerName www1.example.com
# Other directives here ...
DocumentRoot "/www/www2"
ServerName www2.example.com
# Other directives here ...
DocumentRoot "/www/www3"
ServerName www3.example.com
# Other directives here ...
Comments
Post a Comment