Home / Community / Blog

Today I wrote my firs application for ReadyNAS OS. It's very, very simple. It just for Proxy Auto Configuration (PAC) / Web Proxy Autodiscovery Protocol (WPAD) so I called it wpad ;-)

The whole "application" serve only one file wpad.dat. It fits in two files: /apps/wpad/http.conf and /apps/wpad/wpad.dat itself. The content of /apps/wpad/http.conf is:

<VirtualHost *:80>
        ServerAdmin admin@localhost
        ServerName wpad
        DocumentRoot /apps/wpad
        ErrorLog /apps/wpad/error.log
        LogLevel warn
</VirtualHost>

Now when apache starts it creates link:

root@NAS:~# ll /etc/apache2/sites-enabled/090-wpad.conf
lrwxrwxrwx 1 root root 20 Mar 22 21:15 /etc/apache2/sites-enabled/090-wpad.conf -> /apps/wpad/http.conf

To more detailed info about applications for ReadyNAS OS see ReadyNAS Applications Specification.

To have WPAD worked I had to configure also my router:

To resolve wpad as 192.168.1.12 (this is address of my NAS) in /etc/dnsmasq.conf I added:

address=/wpad/192.168.1.12

and to in /etc/config/dhcp file in section config dhcp 'lan':

list dhcp_option '252,http://wpad/wpad.dat'

W trybie VirtualHost przestał mi działać alias'y. Żeby to naprawić trzeba zgodnie z dokumentacją przekazać przetwarzanie dalej (pass through), czyli dopisać np.:

RewriteRule ^/linuxfaq/.* - [PT]

w pliku gdzie definiowaliśmy reguły. U mnie jest to plik /etc/httpd/conf/vhosts.d/00_default_vhosts.conf.

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31