LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-04-2019, 09:52 AM   #1
Thakowbbery
Member
 
Registered: Mar 2005
Posts: 138

Rep: Reputation: 17
Question Httpd and PAC files


So the basic idea is to configure httpd for making a proxy configuration file (.pac) available.

So far I'm on a very basic configuration only with the default configuration files:

CentOS 7.6.1810
Httpd 2.4.6 (yum installed - only the main package and its dependencies)

I created a pac file and used pacparser (https://github.com/manugarg/pacparser) to validate it.

Placed it in /var/www/html and edited /etc/httpd/conf/httpd.conf with:

<IfModule mime_module>
...
AddType application/x-ns-proxy-autoconfig .pac
...
</IfModule>

Restarted httpd. Started with no erros.
Browsing to http://<server>/proxy.pac asks for file download (Chrome, Firefox, IE and Edge).
Checking httpd's access.log shows the URL access correctly.

Now, when configuring the above URL inside any of those browsers for proxy configuration, nothing happens.
When I check httpd's access.log it shows nothing.

Any tips or directions on what could be wrong? Or maybe some other way I can try to debug this? I tried adding some DebugPAC lines into the pac file and then opening the browser's error consoles but nothing shows in there.
It seems that the script is not being executed.

Thank you very much for your time.

Last edited by Thakowbbery; 07-04-2019 at 09:53 AM.
 
Old 07-05-2019, 03:49 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Browsing to http://<server>/proxy.pac asks for file download (Chrome, Firefox, IE and Edge).
Checking httpd's access.log shows the URL access correctly.

Now, when configuring the above URL inside any of those browsers for proxy configuration, nothing happens.
When I check httpd's access.log it shows nothing.
It's not necessary to use the "AddType application/x-ns-proxy-autoconfig .pac" in apache config. It's enough to specify the .pac URL in the client.
For example you can use the URL http://<server>/proxy.pac in firefox's "Automatic proxy configuration URL" setting, or start chrome using:
Code:
chrome --proxy-pac-url=http://<server>/proxy.pac
Anyway does the proxy specified in proxy.pac works and logs any access from these clients?
 
Old 07-05-2019, 11:01 AM   #3
Thakowbbery
Member
 
Registered: Mar 2005
Posts: 138

Original Poster
Rep: Reputation: 17
Actually, I just got back to it and now it just started working.
 
  


Reply

Tags
httpd, proxy



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 33.1 and .autoproxy.pac aihaike Linux - Software 1 11-17-2014 08:45 PM
Local proxy that supports upstream .pac files? dive Linux - Networking 5 08-31-2013 12:02 PM
httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 iswarya Linux - Newbie 1 01-25-2012 01:28 PM
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
LXer: Play Pac-man (and more!) on your PC LXer Syndicated Linux News 0 11-22-2007 06:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration