A. linux 如何重啟apache
樓上的都可以,不過我個人用 httpd -k restart 關鍵是找到httpd這個文件。 [root@test bin]# httpd restart -bash: httpd: command not found 明顯是bash在path所指的目錄下找不到httpd,試試找到它,然後用絕對路徑。比如我們這里是 /home/service/apache/bin/httpd -k restart
B. linux下apache 怎麼把 http改為https
Gworg證書解壓後根據以下配置:
Apache SSL配置
Listen 443 (如果配置已經存在就不要加)
LoadMole ssl_mole moles/mod_ssl.so (如果配置已經存在就不要加)
NameVirtualHost *:443 (非必須,配置多個SSL站點會需要)
<VirtualHost *:443>
ServerName www.gworg.cn
ServerAlias gworg.cn
DocumentRoot /var/www/html
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCertificateFile /etc/ssl/server.crt
SSLCertificateKeyFile /etc/ssl/server.key
SSLCertificateChainFile /etc/ssl/server.ca-bundle
</VirtualHost>