Howtos / Articles

Advanced .PAC proxy auto config file example

The following example pac proxy auto config file will allow you to bypass the proxy server for all local IP addresses, and also set exclusions on specific domain names.   For information on what a PAC file is, please check out:   What is a .pac proxy auto config file     Advanced .PAC proxy auto config file example:   function FindProxyForURL(url, host) { var ProxyServer = “PROXY 192.168.123.1:3128; DIRECT”; //Proxy server to use for HTTP/HTTPS. //var ProxyServer = “PROXY…

Read more [...]

What is a .pac proxy auto config file

A .pac (Proxy Auto Config) file is a file stored on a web server that contains instructions for the browser, to help automate the proxy server setting configuration in a web browser. The .pac proxy configuration file contains JavaScript code, and must contain one function called FindProxyForURL. This function accepts two parameters, a URL, and a Hostname. This function returns either “DIRECT” to tell the client to connect to the web server without using a proxy, or “PROXY” followed by…

Read more [...]

Load Balancing with Nginx

Nginx is a high performance web server, which can also act as a great reverse proxy. Reverse proxy’s are placed in front of the web server handling the processing, to speed the site up, by either caching data, and/or load balancing across multiple back-end web servers. This howto will outline the steps required to set up Nginx as a load balancing reverse proxy.…

Read more [...]

Varnish with Multiple Backends

Varnish has the ability to reverse proxy to multiple backend servers if needed. This howto guide outlines the configuration settings needed to redirect requests to different backends. In our example, we have a web application backend (referenced to as “webapp”), and also a separate backend that just contains static content such as images, javascript, style sheets, etc. The static backend is just referenced as “static”. Both are running on port 8080.…

Read more [...]

Set the X-Forwarded-For header on a nginx reverse proxy setup

When using Nginx as a reverse proxy you may want to pass through the IP address of the remote user to your backend web server. This must be done using the X-Forwarded-For header. You have a couple of options on how to set this information with Nginx. You can either append the remote hosts IP address to any existing X-Forwarded-For values, or you can simply set the X-Forwarded-For value, which clears out any previous IP’s that would have been on…

Read more [...]