Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aquis

macrumors member
Original poster
Aug 7, 2007
63
0
Staffordshire, UK
Hello,

When at University, I need to use a proxy server to access the internet, however when I do a bit of web developing, I do it on localhost—but whenever I try and enter "localhost" in the URL, I can't get there because it tries to route it through the proxy server. I've tried two things:
- Creating my own proxy configuration file which attempts to return a direct connection when connecting to localhost, and:
- Entering localhost as one of the items to exclude from using the PAC file.
But neither of these methods appear to work; I'm still getting a 502: Bad Gateway error when entering localhost or 127.0.0.1 in my browser.

Does anyone know what's wrong?

My "Bypass proxy settings for these hosts & domains" field is:
*.local, 169.254/16, 127.0.0.1, *.localhost
And my pac file is attached.

Thanks for any help!
 

Attachments

  • Nottingham University.pac.zip
    1 KB · Views: 632

Aquis

macrumors member
Original poster
Aug 7, 2007
63
0
Staffordshire, UK
I did try that but no avail, and according to one of Apple's support docs, *.localhost should work anyway (whilst also stopping any subdomains of localhost if I ever needed them). In any case, it appears to have sorted itself out, and it no longer seems to go through the proxy... it literally happened by itself at least a few hours after I posted this thread. Ah well... thanks anyway!
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
I did try that but no avail, and according to one of Apple's support docs, *.localhost should work anyway (whilst also stopping any subdomains of localhost if I ever needed them). In any case, it appears to have sorted itself out, and it no longer seems to go through the proxy... it literally happened by itself at least a few hours after I posted this thread. Ah well... thanks anyway!

You have that backward. Entering localhost.* would bypass the proxy for localhost, localhost.local, localhost.domain.com, etc. While *.localhost would bypass localhost.localhost, a.localhost, another_host.localhost.

For example, if you wanted to bypass the proxy for this site, you would enter *.macrumors.com, not macrumors.com.*
 

bengal85

macrumors regular
Oct 22, 2008
154
0
USA
Just add "localhost" to your bypass, not *.localhost.


Yeah this would help but did you ever stop to think that the whole network might be secure. I tired doing that once at my school but you have to have the exact adress for your proxy server which you will need to get from someone
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
Did you ever stop to read the question asked? He already had the proxy config and wanted to know how to stop his browser from using the existing proxy config when accessing localhost.

Usually you want the entire network secure. It's the whole point of proxies and firewalls. Thanks, but this isn't my first time around the block with respect to networks and security.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.