Women in Technology

Hear us Roar



Article:
  Apache Web-Serving with Mac OS X, Part 4
Subject:   Internal Server Error
Date:   2002-02-18 08:18:12
From:   morbus
Response to: Internal Server Error

Two things to verify:


- Make sure that "My Company's Authentication" is QUOTED after AuthName. If there are no quotes around it, then it would be considered multiple arguments, and thus you'd get the error.


- Make sure that the line encoding of your .htaccess file is set for Unix newlines. If it's Mac or Windows newlines, then that could give the "single argument" warning.

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Internal Server Error
    2002-03-12 21:11:07  kak [View]

    I know I'm coming late to the party but I'm having the identical problem described previously. I've setup the .htpasswd file and it seems fine. I have setup a .htaccess file in the directory I want to protect.

    Trying to access this directory gives me the 500 internal server error and then the 'AuthName takes one argument' warning in the error log.

    I have created the file using sudo pico and then typing it straight in (so I assume the line endings are OK). Is this a correct assumption?

    I definitely have quote around the Authname.

    The full .htaccess file is:

    AuthName "test"
    AuthType Basic
    AuthUserFile /Library/WebServer/.htpasswd
    require user david kim

    Anything else I can try - this is killing me!

    Oh, and one more thing - is it wise/unwise to use the httpd.conf file to change the name of the .ht files to something that can be more easily written to the system - like apple.htaccess or whatever?

    thanks
  • Internal Server Error
    2002-02-18 09:04:40  hammer09 [View]

    Thanks morbus, You were absolutely correct. The .htaccess file that I saved had Macintosh line breaks. As soon as I resaved it as Unix, it worked like a charm. Is there a way to make that the standard way that bbedit saves the files? A preference or something? Thanks again for your help and please keep these articles coming or write your own book about serving apache on OSX. I'd be your first customer!
    • Morbus Iff photo Internal Server Error
      2002-02-20 12:28:39  Morbus Iff | O'Reilly Author [View]

      Yup, you can set BBEdit to automatically save files in Unix linefeeds - I've my 6.5 installation set that way. Take a look-see in your BBEdit Preferences, and I'm sure you'll find it.