Apache was one of the first servers to support IP-based virtual hosts right out of the box. Versions 1.1 and later of Apache support both, IP-based and name-based virtual hosts (vhosts). The latter variant of virtual hosts is sometimes also called host-based or non-IP virtual hosts.
Here is the example of how to add an virtual hosts entry in your httpd.conf (/etc/httpd/conf)
DocumentRoot /var/www/html/wwwsitefolder
#ServerName 192.168.0.99
ServerName www.domain.com
RewriteEngine On
RewriteRule ^/image/(.*)$Â /image.php?do=readfile&filepath=$1
SetEnvIfNoCase Request_URI \ \.(?:gif|jpg|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
Header unset Pragma
FileETag None
Header set Cache-Control "max-age=2592000, must-revalidate"
CustomLog /var/log/httpd/test_access_log combined
ErrorLog /var/log/httpd/test_error.log
No comments:
Post a Comment