Apache virtualhost directive: only ServerName, nothing else -
if create vhost directive, catch requests on ip address. if set servername, other requests redirected documentroot of entry. how can drop requests except specific domain? e.g.:
virtualhost 46.108.122.78:80 servername mysite.com
(i know can specify second directive without servername , redirect e.g. empty dir. however, want explicitly drop these requests.)
the first name-based virtualhost given ip:port default when no other servername/serveralias matches.
# not necessary in 2.4 namevirtualhost 46.108.122.78:80 <virtualhost 46.108.122.78:80> servername xxx.example.com # unmatched hostname on goes here rewriteengine on rewriterule .* - [f] </virtualhost> <virtualhost 46.108.122.78:80> servername foo.example.com documentroot ... </virtualhost>
Comments
Post a Comment