Apache server won't start: unable to open logs

Discussion in 'macOS' started by lenisik, Jun 10, 2010.

  1. lenisik macrumors newbie

    Joined:
    Jun 10, 2010
    Location:
    Copenhagen, DK
    #1
    Hi,

    I am running mac os x 10.5.8
    I want to run the apache server, but i get the following error:

    (2)No such file or directory: httpd: could not open error log file /private/var/log/apache2/error_log.
    Unable to open logs

    It is the first time I try using Web Sharing on my machine, but somehow it seems some files are missing..
    Is it possible to install the apache server anew?

    I would be thankful for any help..
     
  2. sdsvtdriver macrumors 65816

    Joined:
    Jul 31, 2008
    Location:
    Southern California
    #2
    does that directory exist?

    can apache write to it?
     
  3. lenisik thread starter macrumors newbie

    Joined:
    Jun 10, 2010
    Location:
    Copenhagen, DK
    #3
    does that directory exist?
    No it doesn't.

    There is no 'apache2' in /private/var/log/
    The only place I can find an apache2 directory is /private/etc/

    Could it be so simple as to create the directory?
     
  4. psxguru macrumors 6502a

    Joined:
    May 19, 2006
    #4
    yes just open up a terminal and type the following...

    cd /private/var/log
    sudo mkdir apache2

    (type in your admin password when prompted)

    type...

    ls -l

    and you should find the apache2 directory listed similar to this...
    drwxr-xr-x 4 root wheel 136 6 May 14:56 apache2


    if the permissions are not the same type...
    sudo chmod 755 apache2

    you should now be able to start the webserver.
     
  5. lenisik thread starter macrumors newbie

    Joined:
    Jun 10, 2010
    Location:
    Copenhagen, DK
  6. swisskomputer macrumors newbie

    Joined:
    Jun 18, 2011
    #6
    /usr/sbin/apachectl: line 73: ulimit

    Hello everyone,

    I am having the same problem with the server:

    /usr/sbin/apachectl: line 73: ulimit: open files: cannot modify limit: Invalid argument

    BUT, I do have the apache2 directory under /private/var/log

    Any ideas?

    Any help will be greatly appreciated.

    Regards,
     

Share This Page