【发布时间】:2018-06-20 08:08:48
【问题描述】:
您好,我有一个 Angular 4 项目,我想在我的网站上发布
我使用了这些步骤
- ng 构建
- 打开的 dist 文件
- 打开ftp服务器
- 我把所有 dist 文件放到 http_docs\
然后我打开网站并查看此错误
This site can’t be reached
The connection was reset.
Try:
Checking the connection
Checking the proxy and the firewall
Running Network Diagnostics
ERR_CONNECTION_RESET
但如果我在本地工作没有问题
您可以查看此链接 neredenekadar.net
我尝试在 index.html 中将 base href 更改为 '' 和 '/my/app' 以及很多东西,但我做不到
如果我去 neredenekadar.net/Login
我在控制台上收到此错误
GET https://neredenekadar.net/inline.bundle.js net::ERR_CONNECTION_RESET 登录:21 GET https://neredenekadar.net/polyfills.bundle.js net::ERR_CONNECTION_RESET 登录:22 GET https://neredenekadar.net/styles.bundle.js net::ERR_CONNECTION_RESET 登录:23 GET https://neredenekadar.net/scripts.bundle.js net::ERR_CONNECTION_RESET 登录:24 GET https://neredenekadar.net/vendor.bundle.js net::ERR_CONNECTION_RESET 登录:25 GET https://neredenekadar.net/main.bundle.js net::ERR_CONNECTION_RESET
我也在我的项目中使用firebase,也许这些错误与我不知道的firebase有关,请帮助我
【问题讨论】:
-
从网络服务器启动您的项目
-
这是什么意思?
-
现在您将文件作为 FTP 提供,但您应该使用 HTTP 提供它
-
我怎么能用你的方式呢?
-
我们正在使用 nginx 网络服务器来托管文件
标签: javascript angular publish