httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gregory duchesnes" <>
Subject [users@httpd] POST to cgi Authentification Bug
Date Fri, 03 Dec 2004 13:40:54 GMT
hi all,

Prior to explain my problem let's explain my config :

I have a bunch of Vhosts (all password protected Authtype Basic + MySQL).
As i have a lot of scripts which are shared by all Vhosts, i have set up a
shared folder thanks to an alias :

Alias /shared /var/www/shared/

<Directory /var/www/shared>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all

My Vhosts config look like that :

<VirtualHost *>
    ServerName admin.ndd.tlp
    DocumentRoot /var/www/ndd.tlp/admin/web
    CustomLog /var/www/ndd.tlp/admin/logs/access.log combined
    <LocationMatch /* >
        Authtype Basic
        AuthName "Administration"
        Auth_MySQL_DB myauthdb
        Auth_MySQL_Password_Table user_info
        Auth_MySQL_Encrypted_Passwords Off
        require valid-user

I use LocationMatch to make sure anything in the website tree is protected
(including aliases such as the /shared directory) and have a simple
Vhosts.conf file
All this works perfectly well, but now problems begin...

I also have a shared cgi script folder (password protected also thanks to my
LocationMatch rule) :

ScriptAlias /upload/ /usr/lib/cgi-bin/upload/

<Directory /usr/lib/cgi-bin/upload/>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all

in this upload folder, i installed the MegaUpload cgi scripts.
Those scripts consist in 2 parts :
PHP scripts (located in /var/www/shared/private/php/upload)
cgi scripts (located in /usr/lib/cgi-bin/upload/)

First i connect to the /shared/private/php/upload/upload.php page (a form
where i can choose files to upload), then when i click submit, this page
issues a POST request to /upload/upload.cgi and the cgi handles the upload
(and provide a progress bar).

The scripts work perfectly well, except in one browser... (guess which?)
... internet explorer (Bingo!)

What goes wrong is that when i click submit, the file seems to be uploaded
(the little blue progress in the status bar moves), but in fact nothing is
Nothing appears in the logs until i click on stop in the browser, and then i
have a nice 401 error : - - [03/Dec/2004:14:07:26 +0100] "POST /upload/upload.cgi
HTTP/1.1" 401 397
"http://admin.ndd.tlp/shared/private/php/upload/upload.php" "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR1.1.4322)"

I've tried to comment out my LocationMatch rule and everything works fine,
my guess is that IE doesn't send its credentials when issuing the POST
Unfortunately a vast majority of my clients use this browser so i can't ask
them to change to firefox (for example).

Anyone's ever seen this? Know a workaround?
I'd like to keep my LocationMatch rule, since it simplifies greatly my
Vhosts.conf file

Thanks for your help.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message