Boyle Owen wrote:
-----Original Message----- From: Mike Dewhirst [mailto:miked@xxxxxxxxxxxxxxx]I'm convinced Apache 2.0.53 doesn't work as advertised in the docs when you try to get Basic Auth working without a .htaccess file.Some people are convinced the Earth is flat but that don't make it so :-) By far the most likely reason for your problem still is that apache is misconfigured.
OwenWhat I meant was I'm convinced I can't get it work :( :) But you've inspired me to try again.
I inherited that complicated config structure from SuSE. My Windows XP Apache config is in single file and much easier to follow. It will take me a while because it's bedtime now and I've got appointments all day tomorrow. But I'll report back as accurately as I can.
Thanks for helping. Regards mike
I have a couple of points you might like to consider:1) Your config structure is complicated (/etc/Apache2/httpd.conf includes /etc/Apache2/default_server.conf and /etc/Apache2/conf.d/basic_auth.conf... I think?). There's nothing wrong in principle with using Include but it does lead to complicated configs where the order and positioning of the Include statements becomes vitally important. Your "directive having no effect" problem is typical of a misconfiguration in such a set up. As an exercise, open up a copy of the main config file in an editor and then, using cut'n'paste, replace the Includes with the actual contents of the subsidiary config files. This will produce a single, flat config which is what apache sees. Read that - does it seem to make sense?Having said that, I believe you have moved the Auth directives into the main config and they are still apparently ignored. 2) You are still a bit ambiguous about how apache is started... I get the impression that you routinely start it using "apache2ctl start". But when you test it to see if the syntax error is reported, you use "./httpd". Look inside apache2ctl (it is just a shell script) - does it have a "-f" argument to "httpd"? If so, this is the config file apache uses. When you start with "./httpd" on the command line, apache uses a compiled-in path to the config file. To see this, do "./httpd -V" and check the lines "HTTPD_ROOT" and "SERVER_CONFIG_FILE". Is this the same as in "apache2ctl"? 3) Could it be that there are two virtual hosts leading to the same content? Eg, if you set up VH1 and VH2 with the same (or overlapping) docroots and then put all your Auth directives under VH2, they would be ignored if the URL actually led to the content via VH1. This could happen if you screwed up the ServerName in VH2 (because then, apache serves any unidentified request from VH1 by default)... 4) Do you have a "Satisfy Any" directive anywhere in any config file? You stated earlier that you didn't understand this directive so it shouldn't be in use anywhere. If it is, you realise that it switches off password challenges from "Allowed" users...I can get it to request a userid and password with AllowOverride AuthConfig and using a .htaccess file.This is a definate indication that apache is either not reading the file containing these directives or the directory block containing them is not being read when parsing the request (ie, the request is going through a different VH). As a final thought, just to convince yourself that apache does work as advertised, make a little hello_world website. Just one file (index.html) containing "hello world" in one dir (eg /tmp/hello_world). Config file: /tmp/hw.conf contains: DocumentRoot /tmp/hello_world <Directory /tmp/hello_world> Allow from all </Directory> (leave everything else as default) and start it with: ./httpd -f /tmp/hw.conf Test it (http://localhost/) Now add the Auth directives to the Directory block above. Does it work now? Rgds, Owen BoyleDisclaimer: Any disclaimer attached to this message may be ignored.Which brings me to a followup question ...It doesn't like the passwords in the password file. They work fine under Apache 1.3 on my ISP's Linux server. I used htpasswd to create the passwords.Is there way to force Apache2 to use DES or whatever Apache 1.3 is comfortable with?Thanks for being there Mike Mike Dewhirst wrote:Joshua Slive wrote:On 11/12/05, Mike Dewhirst <miked@xxxxxxxxxxxxxxx> wrote:Does apache2ctl confirm that httpd actually reads thatfile on startup?Depends on how httpd normally gets started. If it is started using apache2ctl, then that is a good indication.OK - on investigation it ain't apachectl. It is httpd. Iran httpd -tand it complained about FooBar Nonsense too. So - we are definitely reading the conf files. That means ... 1. I'm not reaching the right directory - Yes I am. 100% sure.2. Some sort of caching? 100% no way. I've tried fourdifferent browserson three different machines.3. Apache is reading the conf but ignoring the directivefor some reasonWhat else do I need for Basic Auth to work?As it happens, I have subversion running via apache on thatmachine andwhen I access it from a foreign machine it asks me toauthenticate. Ihave copied subversion.conf below. Maybe I should copy that?Modules? I deleted all files in /etc/apache2/sysconfig.dand restartedthe computer whereupon we got a brand-new loadmodule.conf ... ## Files in this directory are created at apache start time by /usr/sbin/rcapache2.# Do not edit them! # # as listed in APACHE_MODULES (/etc/sysconfig/apache2) LoadModule access_module /usr/lib/apache2-prefork/mod_access.so LoadModule actions_module /usr/lib/apache2-prefork/mod_actions.so LoadModule alias_module /usr/lib/apache2-prefork/mod_alias.so LoadModule asis_module /usr/lib/apache2-prefork/mod_asis.so LoadModule auth_module /usr/lib/apache2-prefork/mod_auth.soLoadModule autoindex_module/usr/lib/apache2-prefork/mod_autoindex.soLoadModule cgi_module /usr/lib/apache2-prefork/mod_cgi.so LoadModule dav_module /usr/lib/apache2-prefork/mod_dav.soLoadModule dav_svn_module/usr/lib/apache2/mod_dav_svn.soLoadModule authz_svn_module/usr/lib/apache2/mod_authz_svn.soLoadModule dir_module /usr/lib/apache2-prefork/mod_dir.so LoadModule env_module /usr/lib/apache2-prefork/mod_env.so LoadModule imap_module /usr/lib/apache2-prefork/mod_imap.so LoadModule include_module /usr/lib/apache2-prefork/mod_include.soLoadModule log_config_module/usr/lib/apache2-prefork/mod_log_config.soLoadModule mime_module /usr/lib/apache2-prefork/mod_mime.soLoadModule negotiation_module/usr/lib/apache2-prefork/mod_negotiation.soLoadModule setenvif_module /usr/lib/apache2-prefork/mod_setenvif.so # Here is /etc/apache2/conf.d/subversion.conf # see /usr/share/doc/packages/subversion for the full documentation # <IfModule mod_dav_svn.c> ## ## project related HTML files ## <IfModule mod_alias.c> Alias /repos /srv/svn/html </IfModule> <Directory /srv/svn/html> Options Indexes +Multiviews -FollowSymLinks IndexOptions FancyIndexing \ ScanHTMLTitles \ NameWidth=* \ DescriptionWidth=* \ SuppressLastModified \ SuppressSize order allow,deny allow from all </Directory> <Location /repos> DAV svn SVNParentPath /srv/svn/repos AuthzSVNAccessFile /srv/svn/user_access/access-policy #<moved from LimitExcept> # how to authenticate users AuthType Basic AuthName "repositories" AuthUserFile /srv/svn/user_access/auth-file Require valid-user #</moved from LimitExcept> # move 'Require valid-user' to here # to provide public read only access # and require a valid user for GET etc below <LimitExcept GET PROPFIND OPTIONS REPORT> # </LimitExcept> </Location> </IfModule>Joshua.---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTP Server Project.See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTPServer Project.See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTP Server Project.See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxxDiese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a private and personal nature. It is not related to the exchange or business activities of the SWX Group. Le présent e-mail est un message privé et personnel, sans rapport avec l'activité boursière du Groupe SWX.This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx