Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #360483
    hetjan
    Participant

    Hi,

    I’m trying to allow users to add a .htaccess file to specific directories.

    So far I have followed the directions given in the article about .htaccess on 10.2.8 server without luck; I think thats because the directions given there talk about a “site’s” directory.

    What I’m looking for is somewhere to be found in /etc/httpd/httpd.conf, somewhere at or below line 245. But I can’t figure it out.

    My .htaccess file looks like this:

    AuthUserFile /Volumes/Data/Users/joeuser/Sites/.htpasswd
    AuthGroupFile /dev/null
    AuthName EnterPassword
    AuthType Basic
    
    require user borg
    

    The .htpassword file is one line.

    What am I doing wrong?

    #360502
    hetjan
    Participant

    No, I have no reason not to. Just didn’t think it was possible since this is not covered in the manual…

    #360552
    hetjan
    Participant

    I must be thick or something….

    Realms deal with specific directories. I want to allow users to lock directories they wish with a .htaccess file… How do I do that?

    #360554
    Dan Dickinson
    Participant

    You need to tweak AllowOverride within the Directory context for that folder; when it’s set to AllowOverride None, you can’t use htaccess files.

    Try changing it to AllowOverride Limit. Checking the Apache manual would help.

    #360558
    hetjan
    Participant

    Thank you. Checking the manual would help. But I have trouble finding where Apple defines the Sites directory globally.

    In httpd.conf they define the name of the .htaccess file. They say:
    [QUOTE]##### For Mac OS X Server: It’s OK to modify this directive if necessary but note that
    ##### by default AllowOveride is None in all virtual hosts.[/QUOTE]

    I don’t care about the virtual hosts, just the users home directory. I cannot see any line there defining the Users home directory other than
    [QUOTE]## UserDir: The name of the directory which is appended onto a user’s home
    ## directory if a ~user request is received.
    ##
    ##### For Mac OS X Server: It’s OK to modify this directive if necessary, but note that
    ##### the default sites directory created for a new user is “Sites”, and that
    ##### personal websharing is not supported on Mac OS X Server.
    ##

    UserDir Sites
    [/QUOTE]
    But configtest will not allow me to put an AllowOverride there.

    It looks like I will need to be spoonfed Razz

    A.

    #360582
    Dan Dickinson
    Participant

    <Directory "/Users/foobar/Sites/">
    AllowOverride All
    </Directory>

    Replace foobar with the appropriate username. Slap that into httpd.conf at the end.

    #360591
    hetjan
    Participant

    Setting up a block like that for 300 users is not an elegant solution…..

    #360663
    Dan Dickinson
    Participant

    Then do it for /Users/ instead of a named user. Directory directives (heh) are cumulative all the way up the path.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Comments are closed