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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -