如何在 Debian 上的 apache2 中停用連接埠 80 並啟用連接埠 443 https?

如何在 Debian 上的 apache2 中停用連接埠 80 並啟用連接埠 443 https?

我在 Debian 伺服器上安裝了 apache2,並且我想完全停用連接埠 80 上的 HTTP,而僅使用連接埠 443 上的 https。

這是我目前的 ports.conf 文件

連接埠設定檔

這是我的 000-default.conf 文件

000-預設.conf

這是我的 default-ssl.conf 文件

預設-ssl.conf

基本上我的最終目標是能夠對伺服器進行 nmap 掃描,並顯示連接埠 443 上的 https,而完全不顯示連接埠 80 上的 http。


編輯:嘗試註解掉 Listen 80 和 000-default.conf 檔案中的所有內容,當我嘗試重新啟動 apache 時出現以下錯誤

錯誤

答案1

註解 Listen 80 並註解掉 000-default.conf 上的所有行並重新啟動

相關內容