Changes

Jump to navigation Jump to search
Line 47: Line 47:     
   vim /etc/httpd/conf/httpd.conf
 
   vim /etc/httpd/conf/httpd.conf
 
+
  <Directory "/var/www/html">
    <Directory "/var/www/html">
+
     ...  
                     
  −
    #                 
  −
    # Possible values for the Options directive are "None", "All",
  −
    # or any combination of:
  −
    #  Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  −
    #                 
  −
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
  −
     # doesn't give it to you.
  −
    #                 
  −
    # The Options directive is both complicated and important.  Please see
  −
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
  −
    # for more information.
  −
    #                 
  −
    Options Indexes FollowSymLinks
  −
                     
   
     #                   
 
     #                   
 
     # 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>       
    # Controls who can get stuff from this server.
+
  Replace the line "AllowOverride None" with "AllowOverride All"
    #                 
+
 
    Order allow,deny 
+
* Create a web enabled directory proxy
    Allow from all   
  −
                     
  −
    </Directory>       
     −
    Change AllowOverride None ==> AllowOverride All
+
  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:  
   }
 
   }
   −
* 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
   −
  mv proxy.pac /var/www/proxy.pac
+
* Restart httpd web server
  mv .htaccess /var/www/.htaccess
     −
* Restart apache /etc/init.d/apache2 restart
+
  service httpd restart
    
== WPAD - Web Proxy Autodiscovery ==
 
== WPAD - Web Proxy Autodiscovery ==

Navigation menu