Line 40: |
Line 40: |
| Steps: | | Steps: |
| | | |
− | * Create .htaccess file and add the following content: | + | * Install httpd web server: |
| + | |
| + | yum install httpd |
| + | |
| + | * Enable configuration override with htaccess |
| + | |
| + | vim /etc/httpd/conf/httpd.conf |
| + | <Directory "/var/www/html"> |
| + | ... |
| + | # |
| + | # AllowOverride controls what directives may be placed in .htaccess files. |
| + | # It can be "All", "None", or any combination of the keywords: |
| + | # Options FileInfo AuthConfig Limit |
| + | # |
| + | 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 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 50: |
Line 77: |
| } | | } |
| | | |
− | * Upload both file to the same location: | + | * 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 |
| + | |
| + | * Test in your favorite browser |
| | | |
− | mv proxy.pac /var/www/proxy.pac
| + | [[File:testproxyiceweasel-1.png]] |
− | mv .htaccess /var/www/.htaccess
| |
| | | |
− | * Restart apache /etc/init.d/apache2 restart
| + | [[File:testproxyiceweasel-2.png|700px]] |
| | | |
| == WPAD - Web Proxy Autodiscovery == | | == WPAD - Web Proxy Autodiscovery == |