Skakagrall

Q: Can anyone help with apachectl error messages in Terminal?

Does anyone here understand apachectl error messages?

 

When I use the command:

 

apachectl configtest

 

Terminal gives me:

 

Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist Syntax error on line 117 of /private/etc/apache2/extra/httpd-ssl.conf: SSLCertificateFile: file '/private/etc/apache2/server.crt' does not exist or is empty

 

I am trying to install Baikal Server: http://baikal-server.com. Thanks

MacBook Pro with Retina display, OS X Mavericks (10.9.1)

Posted on Feb 17, 2014 5:35 PM

Close

Q: Can anyone help with apachectl error messages in Terminal?

  • All replies
  • Helpful answers

Previous Page 2 of 3 last Next
  • by Skakagrall,

    Skakagrall Skakagrall Feb 18, 2014 6:03 AM in response to Skakagrall
    Level 1 (0 points)
    Feb 18, 2014 6:03 AM in response to Skakagrall

    OK. I have edited /etc/apache2/extra/httpd-ssl.conf.

     

    Can you explain how to "3) do the sudo openssl........ commands"?

  • by TopSteve,

    TopSteve TopSteve Feb 18, 2014 6:05 AM in response to Skakagrall
    Level 1 (69 points)
    Wireless
    Feb 18, 2014 6:05 AM in response to Skakagrall

    Skakagrall wrote:

     

    OK. I have edited /etc/apache2/extra/httpd-vhosts.conf and now if I do the

     

    apachectl configtest

     

    command, I get

     

    Syntax OK.

     

    Should I now edit /etc/apache2/extra/httpd-ssl.conf?

    Just check that all the lines the artical says should be there are there.

     

    The syntax can be OK even if some of the lines are not.

     

    Like in woodwork "check twice cut once" I sometimes go over and over befor moveing on.

     

    Next run the "sudo openssl.........." commands

  • by TopSteve,

    TopSteve TopSteve Feb 18, 2014 6:06 AM in response to TopSteve
    Level 1 (69 points)
    Wireless
    Feb 18, 2014 6:06 AM in response to TopSteve

    OK give me some min's to get the info togever.

  • by TopSteve,

    TopSteve TopSteve Feb 18, 2014 6:13 AM in response to Skakagrall
    Level 1 (69 points)
    Wireless
    Feb 18, 2014 6:13 AM in response to Skakagrall

    same as n the artical but he forgot to add the "sudo" but so

     

    "openssl genrsa -des3 -passout pass:x -out server.pass.key 2048"

     

    shood be

     

    "sudo openssl genrsa -des3 -passout pass:x -out server.pass.key 2048"

     

    and

     

    "sudo openssl rsa -passin pass:x -in server.pass.key -out server.key"

     

    "sudo rm server.pass.key"

     

    "sudo openssl req -new -key server.key -out server.csr"

     

     

    Just highlight the bit's inside the quots "" and cut then past into the terminal one at a time.

  • by TopSteve,

    TopSteve TopSteve Feb 18, 2014 6:17 AM in response to TopSteve
    Level 1 (69 points)
    Wireless
    Feb 18, 2014 6:17 AM in response to TopSteve

    now do:

     

    "sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt"

     

    sudo mkdir /etc/apache2/ssl

    sudo cp server.crt /etc/apache2/ssl/ssl.crt


    sudo cp server.key /etc/apache2/ssl/ssl.key

  • by TopSteve,

    TopSteve TopSteve Feb 18, 2014 6:19 AM in response to TopSteve
    Level 1 (69 points)
    Wireless
    Feb 18, 2014 6:19 AM in response to TopSteve
    apachectl configtest
    sudo apachectl start

    The hard part done

     

    You now have a webserver running on your local computer.

     

    To check just open Safari or some other broswer and put "http://localhost" and you should get a It works page.

  • by Skakagrall,

    Skakagrall Skakagrall Feb 18, 2014 6:27 AM in response to TopSteve
    Level 1 (0 points)
    Feb 18, 2014 6:27 AM in response to TopSteve

    OK. I have done all that. What next?

  • by Skakagrall,

    Skakagrall Skakagrall Feb 18, 2014 6:30 AM in response to Skakagrall
    Level 1 (0 points)
    Feb 18, 2014 6:30 AM in response to Skakagrall

    I get an error message if I try "http://localhost" or https://localhost:8443: Safari can't connect to the server (?)

     

    Any ideas?

  • by TopSteve,

    TopSteve TopSteve Feb 18, 2014 6:38 AM in response to Skakagrall
    Level 1 (69 points)
    Wireless
    Feb 18, 2014 6:38 AM in response to Skakagrall

    Did you get any messages/errors when you typed "sudo apachectl start"?

     

    Type "tail /var/log/apache2/error_log" and post it here?

  • by Skakagrall,

    Skakagrall Skakagrall Feb 18, 2014 6:45 AM in response to TopSteve
    Level 1 (0 points)
    Feb 18, 2014 6:45 AM in response to TopSteve

    I got:

     

     

    org.apache.httpd: Already loaded

     

    Here is the error log

     

     

     

    [Tue Feb 18 22:41:27 2014] [error] Init: Private key not found
    [Tue Feb 18 22:41:27 2014] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag
    [Tue Feb 18 22:41:27 2014] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
    [Tue Feb 18 22:41:27 2014] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
    [Tue Feb 18 22:41:27 2014] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib
    [Tue Feb 18 22:41:37 2014] [error] Init: Private key not found
    [Tue Feb 18 22:41:37 2014] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag
    [Tue Feb 18 22:41:37 2014] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
    [Tue Feb 18 22:41:37 2014] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
    [Tue Feb 18 22:41:37 2014] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib
    
    
  • by TopSteve,

    TopSteve TopSteve Feb 18, 2014 6:50 AM in response to Skakagrall
    Level 1 (69 points)
    Wireless
    Feb 18, 2014 6:50 AM in response to Skakagrall

    OK

     

    We are going to stop the web server.

     

    sudo apachectl stop

     

    Now delete the log

     

    sudo rm -rf /var/apache2/*

     

    Now restart the web server

     

    sudo apachectl start

     

    and have a look at the log file again

     

    tail /var/log/apache2/error_log and post it.

  • by Skakagrall,

    Skakagrall Skakagrall Feb 18, 2014 7:06 AM in response to TopSteve
    Level 1 (0 points)
    Feb 18, 2014 7:06 AM in response to TopSteve

    Here it is:

     

    [Tue Feb 18 23:04:25 2014] [error] Init: Private key not found
    [Tue Feb 18 23:04:25 2014] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag
    [Tue Feb 18 23:04:25 2014] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
    [Tue Feb 18 23:04:25 2014] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
    [Tue Feb 18 23:04:25 2014] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib
    [Tue Feb 18 23:04:35 2014] [error] Init: Private key not found
    [Tue Feb 18 23:04:35 2014] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag
    [Tue Feb 18 23:04:35 2014] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
    [Tue Feb 18 23:04:35 2014] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
    [Tue Feb 18 23:04:35 2014] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib
    
    
  • by TopSteve,

    TopSteve TopSteve Feb 18, 2014 7:34 AM in response to Skakagrall
    Level 1 (69 points)
    Wireless
    Feb 18, 2014 7:34 AM in response to Skakagrall

    OK  the problem is with the ssl files.  Iver theres an error or in the wrong place or the server can't find them.

     

    1) stop the web service.

    2) check the config files

    3) delete the ssl files

    4) re make the ssl files

    5) start the webserver

    6) and check again

     

    by now you should know how to do all these steps but as a reminder I will go though them one at a time.

     

    1) sudo apachectl stop

     

    2)a: edit "/var/apache2/httpd.conf"                                  

    2)b: edit "/var/apache2/extra/httpd-vhosts.conf"

    2)c: edit "/var/apache2/extra/httpd-ssl.conf"

     

    3)  "sudo rm -rf /etc/apache2/ssl/*"

     

    4)      "sudo openssl genrsa -des3 -passout pass:x -out server.pass.key 2048"

              "sudo openssl rsa -passin pass:x -in server.pass.key -out server.key"

              "sudo rm server.pass.key"

              "sudo openssl req -new -key server.key -out server.csr"

              "sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt"

              "sudo cp server.crt /etc/apache2/ssl/ssl.crt"

              "sudo cp server.key /etc/apache2/ssl/ssl.key"



    5)     "apachectl configtest"

             "sudo apachectl start"

     

    6) goto     "http://localhost"

  • by Skakagrall,

    Skakagrall Skakagrall Feb 18, 2014 7:50 AM in response to TopSteve
    Level 1 (0 points)
    Feb 18, 2014 7:50 AM in response to TopSteve

    What do I have to do to /etc/apache2/httpd.conf ?

  • by Skakagrall,

    Skakagrall Skakagrall Feb 18, 2014 8:07 AM in response to Skakagrall
    Level 1 (0 points)
    Feb 18, 2014 8:07 AM in response to Skakagrall

    I have to go now. I will check back tomorrow. Thank you for your help.

Previous Page 2 of 3 last Next