skip to Main Content

I’m trying to setup an Apache according with this tutorial for CentOS 8.

By the end of the tutorial, I cannot restart httpd.
I get this error:

httpd.service - The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Fri 2021-03-12 16:46:21 CET; 8min ago
      Docs: man:httpd(8)
            man:apachectl(8)
   Process: 8469 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
  Main PID: 8469 (code=exited, status=1/FAILURE)

Mar 12 16:46:21 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Mar 12 16:46:21 localhost.localdomain httpd[8469]: AH00526: Syntax error on line 4 of /etc/httpd/sites-enabled/<>.net.conf:
Mar 12 16:46:21 localhost.localdomain httpd[8469]: Invalid command 'DecumentRoot', perhaps misspelled or defined by a module not included in the server configuration
Mar 12 16:46:21 localhost.localdomain system[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 12 16:46:21 localhost.localdomain system[1]: Failed to start The Apache HTTP Server.
Mar 12 16:46:21 localhost.localdomain system[1]: Unit httpd.service entered failed state.
Mar 12 16:46:21 localhost.localdomain system[1]: httpd.service failed.
[tmaciocha@localhost sites-enabled]$

What can I do to force it to start ?

4

Answers


  1. Chosen as BEST ANSWER

    Do you mean this file ? /etc/httpd/sites-enabled/domain.net.conf

    enter image description here


  2. You cannot force Apache to start, with that error; post your .conf file, maybe you have errors there

    Login or Signup to reply.
  3. httpd.conf

        # (You will also need to add "ExecCGI" to the "Options" directive.)
        #
        #AddHandler cgi-script .cgi
    
        # For type maps (negotiated resources):
        #AddHandler type-map var
    
        #
        # Filters allow you to process content before it is sent to the client.
        #
        # To parse .shtml files for server-side includes (SSI):
        # (You will also need to add "Includes" to the "Options" directive.)
        #
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
    </IfModule>
    
    #
    # Specify a default charset for all content served; this enables
    # interpretation of all content as UTF-8 by default.  To use the
    # default browser choice (ISO-8859-1), or to allow the META tags
    # in HTML content to override this choice, comment out this
    # directive:
    #
    AddDefaultCharset UTF-8
    
    <IfModule mime_magic_module>
        #
        # The mod_mime_magic module allows the server to use various hints from the
        # contents of the file itself to determine its type.  The MIMEMagicFile
        # directive tells the module where the hint definitions are located.
        #
        MIMEMagicFile conf/magic
    </IfModule>
    
    #
    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    #
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    #
    
    #
    # EnableMMAP and EnableSendfile: On systems that support it,
    # memory-mapping or the sendfile syscall may be used to deliver
    # files.  This usually improves server performance, but must
    # be turned off when serving from networked-mounted
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    # Defaults if commented: EnableMMAP On, EnableSendfile Off
    #
    #EnableMMAP off
    EnableSendfile on
    
    # Supplemental configuration
    #
    # Load config files in the "/etc/httpd/conf.d" directory, if any.
    IncludeOptional conf.d/*.conf
    IncludeOptional sites-enabled/*.conf
    
    
    Login or Signup to reply.
  4. There was error with a letter 🙂 Document Root instead of Document Root

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search