Fabio Batalha C Santos Santos wrote: > I created a javascript, to access CouchDB. It is as follows: > > var dbname = "mahendradb"; > $.couch.db(dbname).create({ > error:function(status,id,reason) { alert(status+" reason: > "+reason);}, > success:function(resp) { alert (resp); } > }); > > > This script is running on port 80. CouchDB is on port 5984. So, obviously I > will get an error. The error is as follows. > > Error: uncaught exception: Invalid JSON: > 405 Method Not Allowed > Method Not Allowed > The requested method PUT is not allowed for the URL /mahendradb/. > Apache/2.2.14 (Ubuntu) Server at localhost Port 80 > > > The questions is: > How can I access CouchDB from port 80? You can change the port in CouchDB's local.ini. Note that you'll need root privileges to start services on ports below 1024. However, it seems like your also running a separate webserver, and you can't run multiple services on a single port. Either you need to set up a reverse proxy for CouchDB [0] or maybe you could just do away with the separate webserver and serve your application as a CouchApp [1] from CouchDB. Nils. [0] Apache: http://wiki.apache.org/couchdb/Apache_As_a_Reverse_Proxy Nginx: http://wiki.apache.org/couchdb/Nginx_As_a_Reverse_Proxy [1] CouchApp: http://couchapp.org/page/what-is-couchapp ------------------------------------------------------------------------ VPRO phone: +31(0)356712911 e-mail: info@vpro.nl web: www.vpro.nl ------------------------------------------------------------------------