Link to home
Start Free TrialLog in
Avatar of NeilLoffhagen
NeilLoffhagen

asked on

Automatic proxy configuration URL for FILE rather than HTTP

Hi,

I'm not too sure this is the right area to post this question, but couldn't see any other that really fitted either.

We have a new proxy server, which is up and running with no problem.  What we want to do is have a PAC  (Proxy Automatic Configuration) file for users.  Have ceated the PAC file and it works okay when it's on an Intranet site, where we can publish it along the lines of http://server/unit.pac and have that in the users browsers.  Howver, due to company reasons we need to not have this on the Intranet Server but on a seperate file share server.  We have shared a folder, which we can map a drive to and read the PAC file with no problem.  But when we put file://server/unit.pac in the browser configuration it just does not work.  But, if we map the shared drive on the PC and put in the mapped drive letter, as in file://x:/unit.pac it works okay?  Is there some configuration that I'm missing when trying to pint to the shared drive, or is mapping the only way it can be done?

Does this make sense what we're trying to do?

Very keen to sort this out.

Thanks,

Neil.
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

Maybe its just a typing error in your message, but you should put

file://server/share/unit.pac

Michael
Avatar of NeilLoffhagen
NeilLoffhagen

ASKER

Hi Michael,

Yes, you're right there was a typo in the message.  We have been putting file://server/share/unit.pac and it just does not seem to work.  However, as mentioned, if we map a drive to the share, so x: is mapped to //server/share we can then put in file://x:/units.pac and it works.  So the pac file is okay, but either our typing is wrong or it can't be done over a network with the file option.  Did find the following on a Novell/netscape page, which seems to imply it only works for local file, rather than network shares?

" You can also configure the browser to look for a "local" file. The syntax for Netscape browsers is "file:///x|dir/dir/proxy.pac" (where x is the drive letter - note the use of the three slashes and vertical bar). For IE, the syntax is "file://x:/dir/dir/proxy.pac"."

Have you actually ever got it working on a netwokr share?

Thanks,

Neil.
Hi Neil,

I have no system here where I can do some experiments. But please try this:

file:///\\server\share\unit.pac

You can test it by putting this url into your browsers address line.

Hope it helps,

Michael
Michael,

Appreciate your help, but still no go.  What happens when I put in your suggestion is that it gets changed by the browser to become:

file:///%5c%5cserver%5cshare%5cunits.pac/

Changes each "\" to "%5c"?

Wondering, do yuo have any other suggestions for sharing a PAC, other than http which we cannot put on these servers?  Did think about ftp, but the peole in charge don't want that.  They'd prefer http, which we could do if we could get it to use another port than 80.  Can't use port 80, as that's already in use by Squid Proxy Server.  I can set up Apache, on the Server (running SuSe linux), but not sure how to get the browser to use another port in the
Automatic proxy configuration URL?

Neil.
Neil,

I did my tests with IE 6, it won't change \ to %5c.
I ran another test with Firefox 0.9.3 and it changes the backslashes to %5c but  still was able to display my proxy.pac (which just contains a bunch of nonsense lines).

file://///server/share/units.pac

works in Firefox and IE (again, I can only test in the address bar, not in the real PAC option).

Michael



ASKER CERTIFIED SOLUTION
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Michael,

Really apprecaite your help.  The extra "/"s made the difference :)

I'm using Firefox 1.0.3, but the rest of the company is using IE and it still is not wokring with those browsers.  i'll just ned to try diffeent amounts of "/" to see what works.  i'll close the call now as you've got me working okay!

Thanks again,

Neil.
For IE 6 drop one "/":

file:////server/share/units.pac

works fine for IE 6.
Firefox needs 5 "/"s.

Just don't ask ...
Just in case anyone might need to know for the future, for IE you need one less "/" :)

Neil.