doc:appunti:linux:sa:proxy_debug
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| doc:appunti:linux:sa:proxy_debug [2011/09/15 15:50] – created niccolo | doc:appunti:linux:sa:proxy_debug [2011/09/15 17:45] (current) – niccolo | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Substitute HTML or JavaScript | + | ====== Substitute HTML or JavaScript |
| - | ===== How to test changes | + | Using this recipe - while browsing a remote server - you can trick your browser into taking one file (JavaScript, |
| + | |||
| + | This can be useful | ||
| + | |||
| + | It works by telling the browser to use a proxy for a particular URL, and configure a fake web server to serve that content, eventually canged. | ||
| Create a file **'' | Create a file **'' | ||
| Line 8: | Line 12: | ||
| function FindProxyForURL(url, | function FindProxyForURL(url, | ||
| if (shExpMatch(url, | if (shExpMatch(url, | ||
| - | return "PROXY your.server.org: | + | return "PROXY your.server.org: |
| } | } | ||
| } | } | ||
| </ | </ | ||
| - | Configure | + | Configure |
| < | < | ||
| + | NameVirtualHost *:8084 | ||
| + | Listen 8084 | ||
| + | |||
| + | < | ||
| + | ServerName remote.server.com | ||
| + | DocumentRoot / | ||
| + | ServerAdmin webmaster@rigacci.org | ||
| + | ErrorLog / | ||
| + | CustomLog / | ||
| + | |||
| + | # Force .jsp to be served as HTML | ||
| + | AddType text/html .jsp | ||
| + | |||
| + | < | ||
| + | AllowOverride All | ||
| + | </ | ||
| + | </ | ||
| </ | </ | ||
| - | The put the fake file into the DocumentRoot | + | Then put the fake file into the DocumentRoot |
| + | |||
| + | Configure the browser to use automatic proxy configuration, | ||
| - | Configure the browser to use automatic proxy, and give **'' | + | **NOTE:** This trick **does not work with Internet Explorer**, because it caches the proxy configuration on a per-server |
doc/appunti/linux/sa/proxy_debug.1316094630.txt.gz · Last modified: by niccolo
