ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Apache not starting on CentOS 7

    Scheduled Pinned Locked Moved Solved IT Discussion
    apachecentos 7centoshttpd
    17 Posts 3 Posters 6.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch
      last edited by scottalanmiller

      The server is used for ownCloud. It was working. Nothing was changed related to httpd setup. yum update was ran and the server was rebooted.

      [root@oc httpd]# ls -l
      total 12
      drwxr-xr-x. 2 root root   35 Dec 21 14:26 conf
      drwxr-xr-x. 2 root root 4096 Jan  3 01:14 conf.d
      drwxr-xr-x. 2 root root 4096 Jan  3 01:14 conf.modules.d
      lrwxrwxrwx. 1 root root   19 Dec 21 14:26 logs -> ../../var/log/httpd
      lrwxrwxrwx. 1 root root   29 Dec 21 14:26 modules -> ../../usr/lib64/httpd/modules
      lrwxrwxrwx. 1 root root   10 Dec 21 14:26 run -> /run/httpd
      drwxr-xr-x. 2 root root 4096 Jan  3 01:20 ssl
      [root@oc httpd]# cd  ssl
      [root@oc ssl]# ls -l
      total 16
      -rw-r--r--. 1 root root 2102 Jan  3 01:06 oc.acidist.com.crt
      -rw-r--r--. 1 root root 3458 Jan  2 12:22 oc.acidist.com.encrypted.key
      -rw-r--r--. 1 root root 3294 Jan  2 12:27 oc.acidist.com.key
      -rw-r--r--. 1 root root 2106 Jan  3 01:07 root_bundle.crt
      [root@oc ssl]# systemctl start httpd
      Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
      [root@oc ssl]# systemctl status httpd -l
      ā— httpd.service - The Apache HTTP Server
         Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
         Active: failed (Result: exit-code) since Sun 2016-01-17 17:52:51 CST; 5s ago
           Docs: man:httpd(8)
                 man:apachectl(8)
        Process: 3232 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
        Process: 3231 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
       Main PID: 3231 (code=exited, status=1/FAILURE)
      
      Jan 17 17:52:51 oc.acidist.com systemd[1]: Starting The Apache HTTP Server...
      Jan 17 17:52:51 oc.acidist.com httpd[3231]: AH00526: Syntax error on line 101 of /etc/httpd/conf.d/ssl.conf:
      Jan 17 17:52:51 oc.acidist.com httpd[3231]: SSLCertificateFile: file '/etc/httpd/ssl/oc.acidist.com.crt' does not exist or is empty
      Jan 17 17:52:51 oc.acidist.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
      Jan 17 17:52:51 oc.acidist.com kill[3232]: kill: cannot find process ""
      Jan 17 17:52:51 oc.acidist.com systemd[1]: httpd.service: control process exited, code=exited status=1
      Jan 17 17:52:51 oc.acidist.com systemd[1]: Failed to start The Apache HTTP Server.
      Jan 17 17:52:51 oc.acidist.com systemd[1]: Unit httpd.service entered failed state.
      Jan 17 17:52:51 oc.acidist.com systemd[1]: httpd.service failed.
      
      1 Reply Last reply Reply Quote 1
      • scottalanmillerS
        scottalanmiller
        last edited by

        Looks like it thinks it has a syntax error in that config file.

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          What is the status of this file: /etc/httpd/ssl/oc.acidist.com.crt

          JaredBuschJ 1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @scottalanmiller
            last edited by

            @scottalanmiller said:

            What is the status of this file: /etc/httpd/ssl/oc.acidist.com.crt

            Not sure what you mean.. ls -l results in this

            -rw-r--r--. 1 root root 2102 Jan  3 01:06 oc.acidist.com.crt
            

            as note in the text above.

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller
              last edited by

              If you look in the file, it looks normal?

              JaredBuschJ 1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @scottalanmiller
                last edited by

                @scottalanmiller said:

                If you look in the file, it looks normal?

                Yes. looks like a normal cert..

                [root@oc ssl]# cat oc.acidist.com.crt
                -----BEGIN CERTIFICATE-----
                MIIF4jCCBMqgAwIBAgIQIyVm8Bdz9GRKswiZTiYtUzANBgkqhkiG9w0BAQsFADB4
                
                #snipped a bunch out of the middle..
                
                Y3PBtYhJyVJ3Gh8sClT+XGS7WK8mSg==
                -----END CERTIFICATE-----
                [root@oc ssl]#
                
                
                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller
                  last edited by

                  Yeah, doesn't look corrupt, hmmm...

                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                  • JaredBuschJ
                    JaredBusch @scottalanmiller
                    last edited by

                    @scottalanmiller said:

                    Yeah, doesn't look corrupt, hmmm...

                    I grabbed the entire thing and dumped it into notepad++ and saved it as test.crt on my desktop.. it is valid.

                    vHrmSjv.jpg

                    1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch
                      last edited by

                      I realized, OpenSSL updated in that last yum update. wonder if it broke something.

                      This is a pretty basic install.

                      1 Reply Last reply Reply Quote 1
                      • scottalanmillerS
                        scottalanmiller
                        last edited by

                        Seems likely under the circumstances.

                        JaredBuschJ 1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch @scottalanmiller
                          last edited by

                          @scottalanmiller said:

                          Seems likely under the circumstances.

                          I just turned off SSL and it httpd started.

                          but all clients for ownCloud use https.. /sigh...

                          dafyreD 1 Reply Last reply Reply Quote 2
                          • dafyreD
                            dafyre @JaredBusch
                            last edited by

                            @JaredBusch said:

                            @scottalanmiller said:

                            Seems likely under the circumstances.

                            I just turned off SSL and it httpd started.

                            but all clients for ownCloud use https.. /sigh...

                            I'm using Letsencrypt for my ownCloud [personal] set up. It works great!

                            JaredBuschJ 1 Reply Last reply Reply Quote 1
                            • JaredBuschJ
                              JaredBusch @dafyre
                              last edited by

                              @dafyre said:

                              @JaredBusch said:

                              @scottalanmiller said:

                              Seems likely under the circumstances.

                              I just turned off SSL and it httpd started.

                              but all clients for ownCloud use https.. /sigh...

                              I'm using Letsencrypt for my ownCloud [personal] set up. It works great!

                              I am doing so also, but this specific system is actually not accessible off network (at this time). So I chose to use a StartSSL certificate.

                              1 Reply Last reply Reply Quote 1
                              • JaredBuschJ
                                JaredBusch
                                last edited by

                                I have not gotten back to this yet. I just updated a couple users to use http for the short term. this is on my today or tomorrow list depending on how today goes.

                                1 Reply Last reply Reply Quote 1
                                • JaredBuschJ
                                  JaredBusch
                                  last edited by

                                  This has magically resolved itself.

                                  I was finally able to come back to this tonight. Prior to doing anything, I

                                  1. rebooted the server again.
                                  2. ensured ownCloud was working via http.
                                  3. uncommented the certificates in ssl.conf
                                  4. restarted httpd
                                  5. it successfully restart.

                                  I changed nothing in the last week. I never even logged into the damned server.

                                  I don't need this shit. I need to know what is happening so that when I reboot again next month, I can be confident the damned thing comes up.

                                  1 Reply Last reply Reply Quote 3
                                  • scottalanmillerS
                                    scottalanmiller
                                    last edited by

                                    Nothing scarier than things that fix themselves šŸ˜ž

                                    JaredBuschJ 1 Reply Last reply Reply Quote 1
                                    • JaredBuschJ
                                      JaredBusch @scottalanmiller
                                      last edited by

                                      @scottalanmiller said:

                                      Nothing scarier than things that fix themselves šŸ˜ž

                                      Seriously upset about this. I will be rebooting the machine a few times today trying to make it do it again.

                                      1 Reply Last reply Reply Quote 0
                                      • 1 / 1
                                      • First post
                                        Last post