Simple application on ReadyNAS
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'
Komentarze
Log in or create a user account to comment.