Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor Can';找不到已部署的应用程序_Meteor_Digital Ocean_Meteor Up - Fatal编程技术网

Meteor Can';找不到已部署的应用程序

Meteor Can';找不到已部署的应用程序,meteor,digital-ocean,meteor-up,Meteor,Digital Ocean,Meteor Up,我使用mup在数字海洋水滴上部署了我的第一个meteor应用程序。它就在那里,但我不知道我还需要设置什么才能真正查看我的应用程序。所以,当我访问www.example.com时,我应该看到它,但我看到的只是一个apache页面 启动Meteor应用程序时,可以使用--port参数指定要侦听的端口。要使其在您的域名上可用,请指定端口80。不过,如果您已经让Apache监听该端口,它将无法绑定到该端口。卸载或停止Apache,然后重新启动Meteor应用程序 如果您正在使用Apache服务其他内容,

我使用mup在数字海洋水滴上部署了我的第一个meteor应用程序。它就在那里,但我不知道我还需要设置什么才能真正查看我的应用程序。所以,当我访问www.example.com时,我应该看到它,但我看到的只是一个apache页面

启动Meteor应用程序时,可以使用
--port
参数指定要侦听的端口。要使其在您的域名上可用,请指定端口80。不过,如果您已经让Apache监听该端口,它将无法绑定到该端口。卸载或停止Apache,然后重新启动Meteor应用程序

如果您正在使用Apache服务其他内容,并且无法阻止它,那么您需要让Meteor在另一个端口上运行,首先启用Apache
mod_proxy
mod_proxy\u http

sudo a2enmod proxy proxy_http
然后为Meteor应用程序创建一个新的VirtualHost,将请求代理到您决定让它监听的端口。它将看起来像:

<VirtualHost *:80>
        ServerName www.example.com

        ProxyPass / http://localhost:3000/
        ProxyPassReverse / http://localhost:3000/

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

服务器名www.example.com
ProxyPass/http://localhost:3000/
ProxyPassReverse/http://localhost:3000/
服务器管理员webmaster@localhost
DocumentRoot/var/www/html
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合

有关所有详细信息,请参见。

example.com
只是一些教程中给出的域,您将其称为通用示例,并尝试使用给定的IP访问它。我使用example.com作为示例。进入IP也有同样的结果。apache页面。我是否必须指向主机文件中的应用程序?好的,那么如果我为应用程序指定不同的端口,该如何工作?我还需要apache来做其他事情。在这种情况下,你需要设置一个
ProxyPass
我已经更新了上面的答案。谢谢你的帮助。只是旁注。我还必须将我的域添加到hosts文件中。