无法启动HTTPD服务器

时间:2017-07-11 06:30:25

标签: apache redhat virtualhost httpd.conf

在REDHAT上安装HTTPD服务器后,我编辑了VirtualHost的httpd.conf文件。重新启动后,httpd不再工作,这是来自jorunalctl的错误:

Redirecting to /bin/systemctl status  -l httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2017-07-11 02:20:40 EDT; 3s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 10279 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 10278 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 10278 (code=exited, status=1/FAILURE)

Jul 11 02:20:40 ip-172-31-10-20.ec2.internal systemd[1]: Starting The Apache HTTP Server...
Jul 11 02:20:40 ip-172-31-10-20.ec2.internal systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 11 02:20:40 ip-172-31-10-20.ec2.internal kill[10279]: kill: cannot find process ""
Jul 11 02:20:40 ip-172-31-10-20.ec2.internal systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 11 02:20:40 ip-172-31-10-20.ec2.internal systemd[1]: Failed to start The Apache HTTP Server.
Jul 11 02:20:40 ip-172-31-10-20.ec2.internal systemd[1]: Unit httpd.service entered failed state.
Jul 11 02:20:40 ip-172-31-10-20.ec2.internal systemd[1]: httpd.service failed.

我在EOF

添加到httpd.conf
#Enabled Vhosts: 
Include conf/vhosts/domainname1.dom

domainname1.dom具有以下代码

<VirtualHost *:80>
    ServerAdmin webmaster@domainname1.dom
    DocumentRoot "/home/user/http/domainname1.dom"
    ServerName domainname1.dom
    ServerAlias domainname1.dom
    ErrorLog "/var/log/httpd/domainname1.dom-error_log"
    CustomLog "/var/log/httpd/domainname1.dom-access_log" common

    <Directory "/home/user/http/domainname1.dom">
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:443>
    ServerAdmin webmaster@domainname1.dom
    DocumentRoot "/home/user/http/domainname1.dom"
    ServerName domainname1.dom:443
    ServerAlias domainname1.dom:443
    ErrorLog "/var/log/httpd/domainname1.dom-error_log"
    CustomLog "/var/log/httpd/domainname1.dom-access_log" common

    <Directory "/home/user/http/domainname1.dom">
        Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile "/etc/httpd/conf/apache.crt"
    SSLCertificateKeyFile "/etc/httpd/conf/apache.key"
</VirtualHost>

我很高兴再次启动它。

0 个答案:

没有答案
相关问题