Servername in wpad.conf

Hello,

is it possible to assign two subdomains in wpad.conf, I recently tried this one below and it seems to work, but I’m unsure if this is correct.

...
ServerName wpad.green[localdomain]
ServerName wpad.blue[localdomain]
...

In my opinion wpad is automatically generated by ipfire and is a mirror of the “Advanced web proxy configuration”.
Therefor it should work

1 Like

Ok, it seems this type of configuration didn’t work in that setting I used. I assume the Apache server is running on the green IP only but not on blue.

Apache works on blue also. But there must be wpad definitions for blue, too. And squid must be enabled for blue.

I configured this:

Network->DHCP Server->DHCP

Green Interface: Domain name suffix: green.[localdomain]
Blue Interface: Domain name suffix: blue.[localdomain]

Network->DHCP Server->Additional DHCP options

wpad "http://192.168.x.1:81/proxy.pac" BLUE
wpad "http://192.168.y.1:81/proxy.pac" GREEN
wpad code 252=text Definition

Network->Edit Hosts

192.168.y.1 wpad green.[localdomain]
192.168.x.1 wpad blue.[localdomain]

/etc/httpd/conf/vhosts.d/wpad.conf

Listen 80
<VirtualHost *:80>
DocumentRoot "/srv/web/ipfire/wpad"
ServerName wpad.green.[localdomain]
Alias /wpad.dat /srv/web/ipfire/html/proxy.pac
Alias /proxy.pac /srv/web/ipfire/html/proxy.pac
< /VirtualHost>

<VirtualHost *:80>
DocumentRoot "/srv/web/ipfire/wpad"
ServerName wpad.blue.[localdomain]
Alias /wpad.dat /srv/web/ipfire/html/proxy.pac
Alias /proxy.pac /srv/web/ipfire/html/proxy.pac
< /VirtualHost>

Whereas [localdomain] stands for mydomain.tld. It seems to work now. Hope this is correct :slight_smile: