Features/Automatic Proxy Settings: Difference between revisions
| Line 47: | Line 47: | ||
vim /etc/httpd/conf/httpd.conf | vim /etc/httpd/conf/httpd.conf | ||
<Directory "/var/www/html"> | |||
... | |||
# | # | ||
# AllowOverride controls what directives may be placed in .htaccess files. | # AllowOverride controls what directives may be placed in .htaccess files. | ||
| Line 69: | Line 54: | ||
# Options FileInfo AuthConfig Limit | # Options FileInfo AuthConfig Limit | ||
# | # | ||
AllowOverride None | AllowOverride None | ||
... | |||
</Directory> | |||
Replace the line "AllowOverride None" with "AllowOverride All" | |||
* Create a web enabled directory proxy | |||
mkdir /var/www/html/proxy | |||
* Create .htaccess file: | * Create .htaccess file and the following content: | ||
vim /var/www/html/proxy/.htaccess | |||
AddType application/x-ns-proxy-autoconfig .pac | AddType application/x-ns-proxy-autoconfig .pac | ||
* Create PAC file and add the following content: | * Create PAC file and add the following content: | ||
vim /var/www/html/proxy/proxy.pac | |||
function FindProxyForURL(url, host) { | function FindProxyForURL(url, host) { | ||
| Line 93: | Line 77: | ||
} | } | ||
* | * Set permissions for the directory proxy | ||
chown -R apache.apache /var/www/html/proxy | |||
chmod -R 755 /var/www/html/proxy | |||
* Restart httpd web server | |||
service httpd restart | |||
== WPAD - Web Proxy Autodiscovery == | == WPAD - Web Proxy Autodiscovery == | ||