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

    Fedora Update Breaks httpd

    Scheduled Pinned Locked Moved IT Discussion
    fedoraapachelinuxweb server
    18 Posts 6 Posters 2.4k 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.
    • travisdh1T
      travisdh1 @JaredBusch
      last edited by

      @jaredbusch said in Fedora Update Breaks httpd:

      Ah, now I have the problem. I just rebooted.

      So the problem is not that it updated. It is that it updated and something else changed that was not applied until a reboot applied the update. Like the new kernel.

      [root@bookstack ~]# journalctl -u httpd.service -f
      -- Logs begin at Sun 2018-02-11 22:18:27 CST. --
      Feb 19 19:21:32 bookstack httpd[641]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message
      Feb 19 19:21:32 bookstack systemd[1]: Started The Apache HTTP Server.
      Mar 05 12:18:55 bookstack systemd[1]: Stopping The Apache HTTP Server...
      Mar 05 12:19:02 bookstack systemd[1]: Stopped The Apache HTTP Server.
      -- Reboot --
      Mar 05 12:19:29 bookstack systemd[1]: Starting The Apache HTTP Server...
      Mar 05 12:19:31 bookstack httpd[623]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message
      Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
      Mar 05 12:19:31 bookstack systemd[1]: Failed to start The Apache HTTP Server.
      Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Unit entered failed state.
      Mar 05 12:19:31 bookstack systemd[1]: httpd.service: Failed with result 'exit-code'.
      

      Well, bollocks. Thanks for the warning guys.

      1 Reply Last reply Reply Quote 0
      • ObsolesceO
        Obsolesce @JaredBusch
        last edited by

        @jaredbusch What kernel?

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

          @tim_g said in Fedora Update Breaks httpd:

          @jaredbusch What kernel?

          I didn't say the kernel broke anything. I said a new change that was not applied until reboot like the new kernel.

          ObsolesceO 1 Reply Last reply Reply Quote 0
          • ObsolesceO
            Obsolesce @JaredBusch
            last edited by

            @jaredbusch said in Fedora Update Breaks httpd:

            @tim_g said in Fedora Update Breaks httpd:

            @jaredbusch What kernel?

            I didn't say the kernel broke anything. I said a new change that was not applied until reboot like the new kernel.

            Ah I see.

            I just rebooted some web servers last night and no issues.

            0_1520274590378_cb4e86f5-ebb8-497d-a4b8-fd0f17d05511-image.png

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

              And here is the problem. SELinux on the log file.

              -- Unit httpd.service has begun starting up.
              Mar 05 12:23:57 bookstack httpd[1046]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, usin
              Mar 05 12:23:57 bookstack audit[1046]: AVC avc:  denied  { open } for  pid=1046 comm="httpd" path="/var/log/access.log" dev="dm-0"
              Mar 05 12:23:57 bookstack systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
              Mar 05 12:23:57 bookstack systemd[1]: Failed to start The Apache HTTP Server.
              

              That vhost file that we made, bookstack.conf specified this: CustomLog /var/log/access.log combined

              And the SELinux context is not writable by Apache.

              [root@bookstack ~]# ls -laZ /var/log/access.log /var/log/httpd
              -rw-r--r--. 1 root root system_u:object_r:var_log_t:s0   789033 Mar  5 09:51 /var/log/access.log
              
              /var/log/httpd:
              total 12
              drwx------.  2 root root system_u:object_r:httpd_log_t:s0   68 Feb 19 17:46 .
              drwxr-xr-x. 11 root root system_u:object_r:var_log_t:s0   4096 Mar  5 12:19 ..
              -rw-r--r--.  1 root root system_u:object_r:httpd_log_t:s0    0 Feb 19 17:37 access_log
              -rw-r--r--.  1 root root system_u:object_r:httpd_log_t:s0  339 Mar  5 12:23 bookstack.error.log
              -rw-r--r--.  1 root root system_u:object_r:httpd_log_t:s0 3536 Mar  5 12:23 error_log
              

              It should have stated CustomLog /var/log/httpd/access_log combined

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

                So, if you followed the original instructions, you can use this to fix it.

                sed -i "s/access\.log/httpd\/access_log/" /etc/httpd/conf.d/bookstack.conf
                

                Then start apache.

                systemctl start httpd
                
                NashBrydgesN 1 Reply Last reply Reply Quote 3
                • JaredBuschJ
                  JaredBusch
                  last edited by JaredBusch

                  FYI, I totally blame someone else and not myself as I used the conf file from @black3dynamite in my guide.

                  Not sure WTF changed to let it work then not work though.
                  https://mangolassi.it/topic/16458/interesting-take-on-a-wiki-testing-now/30

                  black3dynamiteB 1 Reply Last reply Reply Quote 0
                  • black3dynamiteB
                    black3dynamite @JaredBusch
                    last edited by

                    @jaredbusch said in Fedora Update Breaks httpd:

                    FYI, I totally blame someone else and not myself as I used the conf file from @black3dynamite in my guide.

                    Not sure WTF changed to let it work then not work though.
                    https://mangolassi.it/topic/16458/interesting-take-on-a-wiki-testing-now/30

                    My mistake. I've edited my post.

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

                      @black3dynamite said in Fedora Update Breaks httpd:

                      @jaredbusch said in Fedora Update Breaks httpd:

                      FYI, I totally blame someone else and not myself as I used the conf file from @black3dynamite in my guide.

                      Not sure WTF changed to let it work then not work though.
                      https://mangolassi.it/topic/16458/interesting-take-on-a-wiki-testing-now/30

                      My mistake. I've edited my post.

                      Oh you're fine. Just giving you shit.

                      black3dynamiteB 1 Reply Last reply Reply Quote 0
                      • black3dynamiteB
                        black3dynamite @JaredBusch
                        last edited by black3dynamite

                        @jaredbusch said in Fedora Update Breaks httpd:

                        @black3dynamite said in Fedora Update Breaks httpd:

                        @jaredbusch said in Fedora Update Breaks httpd:

                        FYI, I totally blame someone else and not myself as I used the conf file from @black3dynamite in my guide.

                        Not sure WTF changed to let it work then not work though.
                        https://mangolassi.it/topic/16458/interesting-take-on-a-wiki-testing-now/30

                        My mistake. I've edited my post.

                        Oh you're fine. Just giving you shit.

                        It just sucks that I didn't even notice the incorrect path.

                        1 Reply Last reply Reply Quote 0
                        • NashBrydgesN
                          NashBrydges @JaredBusch
                          last edited by

                          @jaredbusch said in Fedora Update Breaks httpd:

                          So, if you followed the original instructions, you can use this to fix it.

                          sed -i "s/access\.log/httpd\/access_log/" /etc/httpd/conf.d/bookstack.conf
                          

                          Then start apache.

                          systemctl start httpd
                          

                          As always, thanks @JaredBusch that fixed it for me as well.

                          1 Reply Last reply Reply Quote 1
                          • A
                            Alex Sage
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post