[英]Rails 3 + Passenger + Apache: How to change the port for SSL from 443 to 8443?
My hosting service is telling me to change my SSL port from 443 to 8443 since the OpenSSL tests are failing, even though they are working in production. 我的托管服务告诉我将SSL端口从443更改为8443,因为OpenSSL测试失败,即使它们正在生产中也可以正常工作。
I changed my apache ports.conf
file to: 我将我的apache ports.conf
文件更改为:
NameVirtualHost *:80
#NameVirtualHost *:443
NameVirtualHost *:8443
Listen 80
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
#Listen 443
Listen 8443
</IfModule>
<IfModule mod_gnutls.c>
#Listen 443
Listen 8443
</IfModule>
I also changed my virtual hosts from <VirtualHost *:443>
to <VirtualHost *:8443>
and restarted apache, but when I try to access the site via https, the browser says: Firefox can't establish a connection to the server
. 我也将虚拟主机从<VirtualHost *:443>
更改为<VirtualHost *:8443>
并重新启动了apache,但是当我尝试通过https访问该站点时,浏览器说: Firefox can't establish a connection to the server
。 Could it be a firewall issue? 可能是防火墙问题吗?
at first the config looks good, I assume you have ssh enabled 首先,配置看起来不错,我假设您已启用ssh
ssh in the machine : ssh在机器上:
wget --no-check-certificate https://127.0.0.1:8443
or curl -k https://127.0.0.1:443
(post the content) 做wget --no-check-certificate https://127.0.0.1:8443
或curl -k https://127.0.0.1:443
(发布内容) sudo netstat -anp | grep 8443
or sudo lsof | grep ":8443"
) 观察打开的连接,看看它背后是否是实际的Apache进程( sudo netstat -anp | grep 8443
或sudo lsof | grep ":8443"
) /etc/init.d/apache2 restart
) 检查您的配置是否有效( /etc/init.d/apache2 restart
的输出是什么) From your laptop : 从您的笔记本电脑:
Give this book a try, it's awesome to learn new troubleshooting technics. 尝试一下这本书 ,学习新的故障排除技术很棒。
Configuration seams to be right, how do you try to access your site now? 配置接缝正确,您现在如何尝试访问您的站点? should be 应该
https://yourdomain.com:8443/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.