Problem: allow Polycom phone to PUT log and updated directory via HTTP.
After some investigation using telnet (the only real value of telnet
these days) and some help from #vuc I came up with
this:
To see if PUT is working on your server, enter these lines from a terminal on the same box (or change the ip address):
telnet 127.0.0.1 80
PUT /path/file HTTP/1.1
Host:127.0.0.1
(CR an empty line here)
If PUT is working read no further.
If you have a problem it is probably because the file mode needs to be
changed either of the file you are putting or of the directory, or PUT
isn't working. The error message you see should tell you which it is.
Anyway, I needed to install WEBDAV in order for the Apache 2 server
installed on this box would handle the PUT method. I was getting a 405
(METHOD NOT ACCEPTABLE).
To make this happen,
1) Load the webdav module in the load section of httpd.conf
LoadModule dav_module libexec/apache2/mod_dav.so
2) Add this line somewhere OUTSIDE any Directory or Location entities:
DavLockDB /tmp/DavLock
Make sure
3) Create the directory
mkdir /tmp/DavLock and
chmod 777 /tmp/DavLock
4) Add the line
Dav On inside the Location or Directory configuration section you want to use
Dav On
5) Make sure any
an .htaccess file with a specific
Allow from 192.168.1.xxx
#Your Polycom IP address
6) Close httpd.conf
7) sudo apachectl restart
Start testing and look at the eror and access logs. One test would be
to call up the phone's directory and add an entry while watching the
Apache access log and or looking at the date of the directory file
itself.
Apache Errors:
Unable to PUT new contents for /Polycom/0004f09099858-app.log. [403, #0]
403 = the file mode isn't allowing you to modify that file.
Could not open the lock database. [500, #400] The directory you
specified in the DavLockDB directive isn't right or isn't writable
If I say anything dumb or wrong, please comment and correct it







