Menu

Apache not starting on new install of NST 18

NST
rrhoads
2013-06-13
2013-06-14
  • rrhoads

    rrhoads - 2013-06-13

    I have installed NST 18 fresh. I used the nstipconf script and then followed the instructions on the NST Wiki "Static IP Address, SSL Configuration & NST WUI Access" since I was getting an error associated with SSL. Now, after following those directions I am stuck with these two related errors for Apache:

    (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
    (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443

    I checked ssl.conf and apache.conf in /etc/httpd/conf.d/ and can see nothing wrong. I'm no expert at Apache, can someone please help?

     
  • Paul Blankenbaker

    I have seen cases where apache will refuse to start if it can not resolve the name of the host.

    Can you try running the following command:

    ping $(hostname)
    

    If the ping command fails, can you try adding a 127.0.0.1 line to your /etc/hosts file like:

    127.0.0.1 HOSTNAME
    

    Replace HOSTNAME with the same string as what the hostname command reports. After adding the entry, verify the ping command above works and then try starting the web server:

    systemctl start httpd
    
     
  • rrhoads

    rrhoads - 2013-06-14

    I have no problem pinging using the hostname.

    My hosts file (scrubbed for security):
    127.0.0.1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    1.0.1.9 hostname.domain.tld hostname

    I initially also get an error for :
    AH00526: Syntax error on line 10 of /etc/httpd/conf.d/server-apache.conf:
    DocumentRoot takes one argument, Root directory of the document tree

    Which I fix by editing the named file and adding the document root which prior to adding it is "".
    After the above change, the attempted restart of httpd using systemctl gets the errors I first mentioned.

    To be more exact I
    1) Install NST 18 to disk - reboot load from hdd
    2) Login, use nstipconf to set address, gateway, host name, domain name, DNS etc.
    3) Edit ssl.conf to add ip address to VirtualHost and servername lines
    4) Use nstcert: nstcert --common "IPADDRESS" --name server --ssl-host "IPADDRESS" -v
    5) Copy the .key and .crt files to proper locations and set permissions to 644
    6) Copy the server-apache.conf file to /etc/httpd/conf.d
    7) sytemctl restart httpd.service - get error about no document root in server-apache.conf
    8) Add server root to line 10 on server-apache.conf file
    9) systemctl restart httpd.service- get these errors:
    [Fri Jun 14 05:13:14.067819 2013] [core:crit] [pid 17031] (22)Invalid argument: AH00069: make_sock: for address [::]:443, apr_socket_opt_set: (IPV6_V6ONLY)
    (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
    (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443

    End then I'm stuck as I have NO indication of where to go to fix this.

    Oh just in case these are my port list:
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN
    tcp 0 0 127.0.0.1:6010 0.0.0.0:
    LISTEN
    tcp 0 0 127.0.0.1:6011 0.0.0.0: LISTEN
    tcp6 0 0 :::22 :::
    LISTEN
    tcp6 0 0 ::1:6010 ::: LISTEN
    tcp6 0 0 ::1:6011 :::
    LISTEN

     

    Last edit: rrhoads 2013-06-14
  • rrhoads

    rrhoads - 2013-06-14

    SOLVED! I had too man Listen 443 directives, I commented out the one at the top of server-apache.conf in /etc/httpd/conf.d/ and that did the trick.

     

Log in to post a comment.