apache - 共享网络空间上的邮袋服务器
问题描述
我将 PouchDB 用于 Web 应用程序。为了同步,我在本地安装了 PouchDB 服务器进行测试。不幸的是,我在 www 中没有自己的服务器,而只有一个共享的网络空间(使用 apache、SSH 连接和有限的 bash 命令)。
我可以在此安装和启动 pouch 服务器,但我无法从外部获得连接,因为 web 服务器只侦听端口 80,但 pouch 服务器在端口 5984 上运行。
邮袋服务器应可在以下位置访问:sub.domain.tdl/pouchserver
为此,我.htacces
在此目录中创建了一个文件,其内容如下:
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]
调用:sub.domain.tdl:5984/pouchserver/_utils
导致错误页面:Connection Failed
我的问题是,我可以通过重定向请求.htaccess
以便将其发送到邮袋服务器吗?
如果是怎么办?
链接:https ://github.com/pouchdb/pouchdb-server#usage
编辑2:我发现了我的第一个错误。当然,我不被允许调用 5984 端口,或者那里没有答案我并不奇怪。
我想要的是来自浏览器端口 80 的请求.htaccess
被重定向到端口 5984。
但是调用:sub.domain.tdl/pouchserver/_utils
只会导致:The requested URL was not found on this server.
解决方案
推荐阅读
- spring - 致命:数据库“dbName/”不存在
- php - 用php更改最后更新行的html颜色
- html - 正确格式化多个元素 HTML/CSS
- java - 调用 Marketo API 时出现 Java 未知主机异常
- qr-code - 如何在现有图像上嵌入二维码?
- react-native - 在 ReactNative 中从 InnerObject 获取数据
- android - 对本机队列和任务做出反应以进行后台和离线处理
- angularjs - 如何在 Angular JS 的 ng-repeat 中创建小计
- angularjs - 在AngularJS中单击一次后如何永久隐藏按钮
- r - 如何在简单的特征集合中将点突变为线