I use PouchDB for a web application. For the synchronization, I installed the PouchDB server locally for testing.
Unfortunately I don't have my own server in the www, but only a shared webspace (with apache, SSH connection & limited bash commands).
I can install and start the pouch server on this, but I cannot get a connection from outside because the web server only listens on port 80, but the pouch server runs on port 5984.
The pouch server should be accessible at: sub.domain.tdl/pouchserver
For this purpose, I have created a .htacces file in this directory with the following content:
RewriteRule ^$ http://127.0.0.1:5984/ [P,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1:5984/$1 [P,L]
Calling: sub.domain.tdl:5984/pouchserver/_utils results in an error page: Connection Failed
My question is, can I redirect the request via .htaccess so that it is sent to the pouch server?
If yes how?
Link: https://github.com/pouchdb/pouchdb-server#usage
edit2:
I found my first mistake. Of course, I am not allowed to call port 5984, or I am not surprised that there is no answer from there.
What I would like is that the request from the browser on port 80 of the .htaccess is redirected to port 5984.
But a call to: sub.domain.tdl/pouchserver/_utils only results in: The requested URL was not found on this server.