Women in Technology

Hear us Roar



Article:
  Apache Web-Serving with Mac OS X, Part 4
Subject:   editing /etc/httpd/users/<username>.conf breaks web access to Sites folder
Date:   2002-03-11 19:15:38
From:   grosventre
Response to: editing /etc/httpd/users/.conf breaks web access to Sites folder

Yes, there is an index.html fil. The error_log entries relevant are:
[Mon Mar 11 19:55:59 2002] [error] [client 199.104.80.94] File does not exist: /Users/michaelh/public_html/
and
[Mon Mar 11 19:56:58 2002] [error] [client 199.104.80.94] File does not exist: /Users/michaelh/public_html/index.html


After various incarnations, the username.conf file now looks like this:


<Directory "/Users/michaelh/Sites/">
Options Includes Indexes Multiviews
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>
ScriptAlias /~michaelh/cgi-bin/ "/Users/michaelh/Sites/cgi-bin/"


Pretty much per one of your examples


The error page:


Not Found
The requested URL /~michaelh/index.html was not found on this server.


------------------------------------------------------------------------
Apache/1.3.22 Server at 127.0.0.1 Port 80



and if that's not a 404 error, I haven't been configuring apache on FreeBSD boxes for the past five years :)



I definitely appreciate these articles,. as they help make testing my cgi work much easier locally.


Thanks for any ideas you may come up with,
Michael

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Morbus Iff photo editing /etc/httpd/users/<username>.conf breaks web access to Sites folder
    2002-03-13 20:10:28  Morbus Iff | O'Reilly Author [View]

    Whoa, where did this "public_html" directory come from, as per your error message? "public_html" is the equivalent of "Sites", only for other distributions like Redhat, SuSE, and so on and so forth - its kinda like the default user website directory.

    Open up your httpd.conf file and do a search for the UserDir directive. That should be set to "Sites", not "public_html". If it's not, do a search on the rest of the conf file for "public_html" - that's what's causing your problem.
    • editing /etc/httpd/users/<username>.conf breaks web access to Sites folder
      2002-03-14 10:50:31  grosventre [View]

      Well,
      at one point, after breaking my httpd.conf, I had to restore it from the httd.conf.bak that was included in my apache. Following your prompt, I found the lines:

      <IfModule mod_userdir.c>
      UserDir public_html
      </IfModule>

      After replacing the public_html, with Sites, as well as a couple of other tweaks to httpd.conf with respect to the other directories, my Sites folders behave identically to my /Library/Webserver/ folder.

      I suppose the httpd.conf.bak, was a generic Apache backup file(?), using the public_html directory , instead of Sites, or htdocs (my accusatomed Free BSD default.

      Mystery solved. Thanks!