httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Gabriel Duquesnoy" <jean-gabr...@duquesnoy.de>
Subject RE: Apache and PHP on Linux
Date Thu, 13 Dec 2001 13:29:12 GMT
Thank you for your help. My problem was that I had an old installation of
Apache 1.3.22 without SSL, and when configuring PHP it used the wrong
installation, so the one I was using was not PHP enabled.
Now I have another problem, which concerns the authentication. I have a
directory where any of the registered users can access, but some of the
pages should only be accessible for users within a specific group.
I have defined the group, but how do I define the pages using a <FilesMatch>
</FilesMatch> directive. I have tried something, but it does not seem
to work, at least not the way I want it to work.
The pages I want to restrict have filenames like add*.php, amend*.php
and del*.php.
I have tried the directive <FilesMatch "(add|amend|del)*.php $">
but it does not seem to be working.
Has anybody an idea, or can give me the exact syntax of regular expressions
within a <Files> or <FilesMatch> directive.

Regards,

Jean-Gabriel

> -----Original Message-----
> From: Mark Constable [mailto:markc@renta.net]
> Sent: Thursday, December 13, 2001 11:45 AM
> To: apache users
> Subject: Re: Apache and PHP on Linux
>
>
> On Thu, 13 Dec 2001 18:30, Jean-Gabriel Duquesnoy wrote:
> > I have such a line, and there is no error in the defined log file.
> > But I found the reason which was once again permissions, the .php
> > files had only read and write permissions and no execute rights.
>
> Nooh, PHP does not need the eXecute bit set, that is
> for "normal" CGI programs.
>
> > Now I get another error, on the browser side it says:
> > "Internal server error  The server encountered an internal error or
> > misconfiguration and was unable to complete your request. ..."
> > In the Apache error log file I get the following:
>
> Ah, so you definately have an error.log. Now if you
> happen to have other ErrorLog settings in <VirtualHost>
> entries then errors will go to those particular files
> instead of the main one.
>
> > "configuration error: couldn't check user. No user file?:
> /path/file.php"
>
> Ah, this one is where you have an .htaccess file but
> no associated passwd file to lookup up the user/pw pair.
>
> > Could anyone please help me out? Which user file is meant? I am
> > using Apache with mod-SSL and user authentication on the directory.
>
> You've got 3 seperate things going on here, confirm
> each part works first before putting them all together.
> First PHP, then authentication and then SSL last.
> Put this in your confirmed DocumentRoot (for the
> paricular host or vhost in use)...
>
>  <?php phpinfo() ?> (in a file called "phpinfo.php")
>
> Then try to access it as http://yourhost.com/path/phpinfo.php
> and don't try authenticating or SSL until that file
> presents itself properly.
>
> Then put a .htaccess in that same dir (that we now
> know works with PHP) with something like...
>
> AuthName "My Site"
> AuthType Basic
> AuthUserFile /path/to/your/.htpasswd
> Require valid-user
>
> Then (for testing) create a .htpasswd file in the same
> directory created by using the htpasswd program (supply
> a -h argument or read it docs) that comes with apache.
> If you have users already in /etc/passwd then you could;
>
> grep someuser /etc/shadow | awk -F: '{print $1":"$2}' > .htpasswd
>
> Then for SSL... well the last time I posted some SSL
> snippets I got roasted for not having it 100% right, so
> look in the mailing-list archives (I hate saying that).
>
> --markc
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message