Women in Technology

Hear us Roar

  Apache Web-Serving with Mac OS X: Part 2
Subject:   problems with httpd.conf
Date:   2002-04-28 18:57:47
From:   beefyt
I was trying to get ScriptAlias to point to another directory with no luck. I eventually just tried to get an Alias to work and it still wouldn't. The point where I gave up is when I changed

Alias /icons/ "/usr/share/httpd/icons/"


Alias /banana/ "/usr/share/httpd/icons/"

saved, and closed. I then logged into and guess what, it loaded just fine. errored. The log file said

[Sun Apr 28 21:43:08 2002] [error] [client] File does not exist: /Library/WebServer/Documents/banana/

which implies that the alias failed and it just looked for /banana/ in the default /Documents directory. So why didn't the alias work? Why doesn't Apache read my httpd.conf file!

When I invoke httpd -V it clearly says

-D SERVER_CONFIG_FILE="/etc/httpd/httpd.conf"

yet changes I make to that file do not take effect. I am sure the changes are saved and the file is closed when I try to access it. Is Apache using a different config file? Please help me, I'm lost.

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • ahh, fixed it
    2002-04-28 19:13:46  beefyt [View]

    So no one told me you had to restart the server. Anyone know how to reload the config file without restarting the machine?
    • Morbus Iff photo ahh, fixed it
      2002-04-29 04:21:26  Morbus Iff | O'Reilly Author [View]

      "sudo apachectl stop" will stop the Apache webserver, and "sudo apachectl start" will start it up again. You can also do "sudo apachectl restart" which combines both a "stop" and "start".
      • restarting server
        2006-06-22 05:39:40  carlco2 [View]

        sudo apachectl graceful