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>