Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Authorization problem?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authorization problem?
Authored by: ricklin on Sep 13, '02 10:25:41AM

My own WebDAV server runs without any problems as long as I quote out the whole authorization section:

<Directory "/Library/WebServer/Documents/dav">
# AuthName 'WebDAV'
# AuthType Basic
# AuthUserFile /etc/httpd/.htpasswd
# AuthGroupFile /dev/null
# <LimitExcept GET HEAD OPTIONS>
# require valid-user
# </LimitExcept>

Otherwise, Personal Web Sharing won't start up and my Console log shows an error:

Syntax error on line 410 of /etc/httpd/httpd.conf:
AllowOverride not allowed here
/usr/sbin/apachectl start: httpd could not be started

Anybody has an idea what this could be? Thanks a lot for any help!

[ Reply to This | # ]
Authorization problem?
Authored by: westin on Sep 24, '02 03:52:15PM

I think the problem is the closing </Directory> tag you put in there. If your file works like that, then uncommenting the </Directory> tag would close the Directory directive prematurely, before the AllowOverride directive I presume comes next.

[ Reply to This | # ]
Authorization problem?
Authored by: robleach on Feb 17, '03 03:26:09PM
I had some trouble because I didn't follow the procedure to a "T". I attempted to use the authorization stuff I'm familiar with and already use at work on sun machines. instead of doing this line:
htpasswd -m -c /etc/httpd/.htpasswd user
I didn't use the -m and I used my existing .htpasswd file in my home directory. (And yes, I changed the specifiied location in the Directory tag.)

When I restarted apache, everything appeared fine, but I couldn't publish. I later discovered that apache wasn't running. here's what the error log had to say:
Processing config directory: /private/etc/httpd/users
 Processing config file: /private/etc/httpd/users/amy.conf
 Processing config file: /private/etc/httpd/users/marti.conf
 Processing config file: /private/etc/httpd/users/rob.conf
 Processing config file: /private/etc/httpd/users/yet.conf
[Mon Feb 17 11:54:11 2003] [warn] pid file /private/var/run/ overwritten -- Unclean shutdown of previous Apache run?
[Mon Feb 17 11:54:11 2003] [notice] Apache/1.3.27 (Darwin) DAV/1.0.3 configured -- resuming normal operations
[Mon Feb 17 11:54:11 2003] [notice] Accept mutex: flock (Default: flock)
[Mon Feb 17 11:54:11 2003] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon Feb 17 11:54:12 2003] [alert] Child 731 returned a Fatal error... 
Apache is exiting!
For those of you that don't have the location of this log memorized (like me), it's /etc/var/log/httpd/error_log.

So I went back and changed the .htpasswd file location back to what was suggested and used to suggested command and everything worked fine. So I'm wondering what the -m flag does and I'm wondering if it could be related to another problem I'm having with that other .htpasswd file I have. I'd put a .htaccess file in a directory I wanted to protect, indicating the appropriate file, but no authentication happens. Here's my access file:
AuthType Basic
AuthName "My Access"
AuthUserFile ~rob/.htpasswd

require valid-user
order allow,deny
allow from all
deny from none
If I simply use the -m flag, will it fix this access problem too?


[ Reply to This | # ]