jeudi 8 mars 2018

Filtering on IP and FQDN on HTTPD Virtual Host

Here is a sample file to filter on IP

NameVirtualHost *:80
ProxyPreserveHost On







#Redirection for www Host on another Website

ServerName www.mycompany-france.com
Redirect / http://www.mycompany.com/


#Redirection for error host to display the specific message "You are not authorized to access from this ip
 
ServerName error.
mycompany-france.com


# Document to display in case of authorization refused# you may indicate in that document the procedure to follow to add an ip
ErrorDocument 403 http://error.mycompany-france.com/error/authreq.html


# The place where the IP are added.

Order deny,allow
Deny from all
Allow from 80.231.232.69 193.56.36.2 193.202.91.11 90.89.210.95

# The application server for My company work council
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ServerName workcouncil.mycompany-france.com