我在一个AWSLightSailUbuntu20.04实例上托管了一个运行在Apache2上的基于Django的网站。
当您使用ip ( 18.133.43.205 )时,可以访问该网站。但是当我尝试使用域名roosta.xyz搜索我的网站时,连接超时了。
DNS正在使用AWS的名称服务器。我不认为DNS是问题所在,因为当我查找时,它会显示AWS名称服务器,当我在linux终端中运行roosta.xyz时,会返回正确的ip。
几天前,我收到了服务器的响应,但是它请求使用https,但是我没有ssl证书,所以我的浏览器吓坏了。我不想使用https。但是,在对服务器进行了干预,试图停止使用https之后,我现在又回到了连接上,只是超时而已。
另一件事是,我在自己的机器终端上运行curl roosta.xyz,它返回网页的html?铬怎么会不明白呢?!
下面是apache虚拟主机配置文件的副本:
ServerName www.roosta.xyz
ServerAdmin webmaster@localhost
ServerAlias roosta.xyz
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static /home/ubuntu/myWebsite/static
Require all granted
Require all granted
WSGIScriptAlias / /home/ubuntu/myWebsite/myWebsite/wsgi.py
WSGIDaemonProcess myWebsite_app python-path=/home/ubuntu/myWebsite python-home=/home/ubuntu/myWebsite/venv
WSGIProcessGroup myWebsite_app Apache2ctl -S
VirtualHost configuration:
*:80 roosta.xyz (/etc/apache2/sites-enabled/myWebsite.conf:2)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used在连续搜索了几个小时后,我完全不知所措。我非常乐意提供更相关的代码或图片的lightsail设置,以帮助解决我的问题。
发布于 2021-03-05 15:15:44
http://www.roosta.xyz URL,并将http更改为https URL。从Chrome测试HSTS策略: got chrome://net-internals/#hsts

您的域是预加载的HSTS列表的一部分(可能是在https://hstspreload.org/上提交的),请参阅:https://source.chromium.org/chromium/chromium/src/+/master:net/http/transport_安全性_状态_static.json
要解决这个问题,要么需要将域从HSTS load列表中删除(短期内不会发生),要么需要设置TLS,以便站点出现在https之上。
https://serverfault.com/questions/1056059
复制相似问题