我创建了一个虚拟机CentOS。 在端口80和443的控制面板中创建了端点。在CentOS中添加了规则到iptables:
# Generated by iptables-save v1.4.7 on Thu Aug 9 18:07:49 2012
*filter
:INPUT ACCEPT [142:12032]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [146:18544]
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
COMMIT
# Completed on Thu Aug 9 18:07:49 2012
运行应用程序:
CompilerOracle: exclude jregex/Pretokenizer.next
Listening for transport dt_socket at address: 8000
18:07:05,799 INFO ~ Starting /srv/play-1.2.5/localevent
18:07:05,808 INFO ~ Module .svn is ignored, name starts with a dot
18:07:06,820 WARN ~ You're running Play! in DEV mode
18:07:06,975 INFO ~ Listening for HTTP at /127.0.0.1:80 (Waiting a first request to start) ...
我去了地址:*.сloudapp.net
但应用程序无法启动。可能是什么原因?
SELinux被禁用。 CentOS版本 - 6.2
为测试安装了Apache。主页Apache显示。 在httpd.conf中添加了80到9000端口的代理。 Play在9000端口发布。 Apache返回503错误。 Wget 127.0.0.1:9000使一切正常。
答案 0 :(得分:0)
AFAIK,您必须将端点添加到Azure虚拟机,以便允许连接到80 TCP端口。
例如,通过将您的私人和公共端口设置为80,在“将Redis暴露到外部”部分下看到此doc。
答案 1 :(得分:0)
查看日志Apache:
[error] (13) Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:9000 (127.0.0.1) failed
[error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
解决方案:
setsebool httpd_can_network_connect 1