httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Gingras <francois.ging...@gmail.com>
Subject Re: [users@httpd] directoryindexing or what?
Date Tue, 18 Oct 2011 18:35:11 GMT


On 10/18/2011 11:08 AM, Tom Evans wrote:
> On Tue, Oct 18, 2011 at 3:44 PM, Georgi Georgiev<georgi.int@gmail.com>  wrote:
>> Hello, I have slackware 13.37 web server, but when I open from browser
>> wordpress for example list the php file instead loading the site. I have in
>> httpd.conf (tryed different variants)
>> <Directory />
>>      Options Indexes FollowSymLinks MultiViews
>>      AllowOverride Indexes
>>      #Order deny,allow
>>      #Deny from all
>> allow from all
>> DirectoryIndex index.html index.php
>> </Directory>
>> .....
>> <IfModule mod_dir>
>>      DirectoryIndex index.html index.php
>> </IfModule>
>>   tryed and with htaccess, but no effect. Uncomented the line in httpd.conf
>> for mod_php, but again the same. Where is the problem - missing module,
>> error in the cod or? If recompile php?
>
> In addition to what Mark has said, your<IfModule>  line is incorrect.
> You can either use the module file name, or you can use the module
> identifier.
>
> For the directory module, the file name is 'mod_dir.c' and the module
> identifier is 'dir_module', neither of which match 'mod_dir', so that
> directive is never applied.
>
> Secondly, do you ever intend to run the server without mod_dir? Is it
> ever correct to start the server without mod_dir making index.php a
> directory index? If it is not, the<IfModule>  is redundant and will in
> fact hide this error if mod_dir is not enabled for some reason.
>
> Cheers
>
> Tom
>
> ---------------------------------------------------------------------
> 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
>     "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

You should not use AddType for this. Instead, use:

<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>

See http://wiki.apache.org/httpd/PHPDownload and
http://www.php.net/manual/en/install.unix.apache2.php

Frank


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


Mime
View raw message