node.js - 将 .htacees 指向使用 SSL 配置的节点服务器
问题描述
我在 .htacess 文件中使用以下配置
# RewriteRule ^(.*)?$ http://127.0.0.1:3001/$1 [P,L]
# RewriteRule ^(.*)?$ https://127.0.0.1:3001/$1 [P,L]
当我在节点服务器中添加 SSL 配置并使用 https 模块时,URL 返回 503 services not found 但在我删除 SSL 并使用 http 模块时工作正常。
解决方案
通过删除解决了问题
RewriteRule ^(.*)?$ http://127.0.0.1:3001/$1 [P,L]
推荐阅读
- java - java - 如何在一次迭代中从java中的数组中删除多个元素?
- vim - 如何在 VS Code 中跳转到文件资源管理器?
- javascript - AttributeError 问题:“WebDriver”对象没有“管理”属性
- mysql - 将 50GB 数据导入 MySQL 哪个更快?数据库源或shell命令读取文件?
- javascript - 我想根据薪水使用 if 条件修改数组
- reactjs - 获取远程图像并将其转换为 gatsby 图像
- python - 使用具有一定大小的较小矩阵和 numpy 数组循环遍历 nxn 矩阵
- list - 从列表的所有元素中的字符串中删除字符
- json - 使用 Swift4 解析 json 时出错,无法打印
- java - 如何在 Eclipse 中从参考库中导入类?