Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OS X Server Question

    Hi,

    I have recently migrated our server to OS X Server, which seems to be very stable, but I cannot get .htacces files to work, I have added the 'AccessFileName' line in httpd_macosxserver.conf, and written an '.htacces' file and a '.htpasswd' file to protect a folder, but it lets me view the folder regardless.

    Any ideas????

  • #2
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, are you using Apache? It does not sound like it.

    .htaccess belongs to Apache, you see

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OSX server *is* Apache.

    I haven't worked specifically with that build; there may be differences with how htaccess works, or it might just be an error in your ht files;

    I'm not sure; two things spring to mind -

    1 - does .htpasswd contain *encrypted* data - I don't think you can put plain-text passwords in a .htpasswd

    2 - is your file called ".htaccess" or ".htacces" - you put the latter, but that might have been a typo


    Otherwise, try googling for "htaccess OSX" or some such combination - might be docs out there that tell you what's going on
    Last edited by brothercake; 03-13-2003 at 01:22 PM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK, fair enough - I didn't know OSX had anything to do with Apache by default. (I tend to stay as far away from Macs as possible )

    ...does it use Apache as in, a proper build, or a modded one?

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #5
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It uses a 'complete' build of Apache, the spelling was a typo, it is called '.htaccess', I am using a Mac because OS X is the most stable operating system on the market and it includes full UNIX-based operating system and Apache web serving.

    The .htpasswd file contains encrypted data created from http://www.euronet.nl/~arnow/htpasswd/

    I have tried google, I could not find anything on the subject.

  • #6
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by dan_c00per
    It uses a 'complete' build of Apache, the spelling was a typo, it is called '.htaccess',
    Yeah... I noticed that

    I am using a Mac because OS X is the most stable operating system on the market
    really? ...I didn't know that - I take it you have not tried Linux, then?

    and it includes full UNIX-based operating system and Apache web serving.
    Yes, but getting OSX to work as a webserver *properly* is apparently notoriously difficult. I don't actually know first-hand because I have had no experience of OSX (thank god!) but I know people who have

    The .htpasswd file contains encrypted data created from http://www.euronet.nl/~arnow/htpasswd/

    I have tried google, I could not find anything on the subject.
    I find that a surprise... look at the Apache docs at www.apache.org for a start

    I also don't really believe you searched google properly - I typed in "htaccess" and I got LOADS of stuff:

    http://www.google.com/search?hl=en&i...=Google+Search

    Quite a few of those links are good ones and will help you a lot. And that's just on the first page

    ...remember, "google is your friend"!

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #7
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I meant the most stable GUI operating system, and it is very stable, I have not yet managed to crash it, I found a few bits on Google, but they basically all said the same, I have followed them to the letter and still no luck.

    I have discovered a command-line util called 'htpasswd' which generates '.htpasswd' files, but still no luck, I think the problem lies in the .htaccess file, here is the file:

    AuthUserFile /Library/WebServer/Documents/.htpasswd
    AuthGroupFile None
    AuthName TestRealm
    AuthType Basic


    require user test

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by krycek
    (I tend to stay as far away from Macs as possible)
    I used to be the same; but OSX to OS9 is like WinXP to Win95, as an analogy for quality improvement. OSX is fantastic - my G3 has never crashed (well once, but that was my fault!).

    And the GUI is just beautiful; vaguely similar to RedHat in its design aesthetic, but imo much nicer

    dan_c00per - sorry, I don't know then. When I get home later, I'll try it out and see if anything is apparent.
    Last edited by brothercake; 03-13-2003 at 09:50 PM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #9
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am getting somewhere now, I had 'AllowOveride None' in my httpd.conf file, which I have now changed and I get a server error, but at least it is now reading the .htaccess file, I just have to find the error in that now.

    Cheers.

  • #10
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Found the problem, it wasn't loading the 'mod_auth' module, it was loading some Apple variation of it which did not contain the 'AuthUserFile' command.

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so how did you get user authentication to work without that mod, or was it just a case or re-writing the directive to a different command name?
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #12
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The build does contain the right module, it was just a case of replacing the Apple one with the Apache one in the config file.


    I have got it to the point of asking for a User name and password now, but it tells me the password is wrong everytime, I must still be missing something.

  • #13
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm trying to test this out ... but OSX won't let me create a file that starts with a dot.

    What's the trick?
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #14
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use terminal

    Go to the folder you want to create it in and type

    'touch <filename>'

    and then

    'pico <filename>'

    to edit it.

    The Finder won't show file starting with '.', it sees them as restricted system files, so it still won't show in the finder after you've created it, or when you 'ls' in terminal, you have to do a 'sudo ls' and enter your password to see it

  • #15
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've managed to re-create the problem ...

    That was fun in itself - configuring it from scratch, particularly when you've never used a UNIX terminal before But thanks to your instructions, and O'Reilly Mac Devcenter, I now have a working OSX Server (well mostly, apart from the same problem you have!)

    But I need to sleep ... I'll try some other stuff tomorrow (unless you've found the answer ...?)
    Last edited by brothercake; 03-14-2003 at 01:37 AM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •