0

After Installing HTTPD server on REDHAT, I edited httpd.conf file for VirtualHost. After the reboot the httpd was not working anymore, here is error from 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.

I added this to httpd.conf at EOF

#Enabled Vhosts: 
Include conf/vhosts/domainname1.dom

domainname1.dom having following code

<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>

I will be glad for all the ideas to start it again.

  • So what does your http servers error log file say and what changes did you make to the configuration? – arkascha Jul 11 '17 at 06:34
  • I added this to httpd.conf #Enabled Vhosts: Include conf/vhosts/domainname1.dom https://wiki.archlinux.org/index.php/Apache_HTTP_Server#Virtual_hosts – user7551881 Jul 11 '17 at 06:39
  • Please do not use comments to add relevant information to your question. There is an `edit` link below your question. _Use it_. – arkascha Jul 11 '17 at 06:40
  • I used your exact config with little tweek but i wasn't able to replicate it. What is the error you are seeing in /var/log/httpd/domainname1.dom-error_log? – Innocent Anigbo Jul 11 '17 at 11:01

0 Answers0