Howdy! 

I'm fairly new to OpenBSD and especially httpd's config syntax. 
Anyway, been trying to make PHP-FPM play nice with httpd and I can't quite
figure out this auto index issue. 

My goal is to auto index /htdocs, unless there is an index.php present. 
Naturally I read the man pages, checked /etc/examples/httpd.conf and ended
up with this httpd.conf: 

# $OpenBSD: httpd.conf 2015/10/19 21:55:24 anigma Exp $ 

server "default" { 
        listen on egress port 80 
        directory { auto index, index "index.php" } 

        location "*.php" { 
                fastcgi socket "/run/php-fpm.sock" 
        } 
} 

types { include "/usr/share/misc/mime.types" } 


This results in "Access denied" and an error in httpd debug mode: 

# httpd -d -vvv                                                                 
                    
startup 
socket_rlimit: max open files 1024 
socket_rlimit: max open files 1024 
socket_rlimit: max open files 1024 
server_privinit: adding server default 
server_launch: running server default 
server_launch: running server default 
server_launch: running server default 
Access to the script '/htdocs' has been denied (see
security.limit_extensions) 
default 192.168.1.153 - - [20/Oct/2016:00:27:58 +0200] "GET / HTTP/1.1" 403
0 


If change the index to say "index.html", everything works the way it's
supposed to. 
Is this by design or am I doing something wrong? 

Thanks, 
Alen.



--
View this message in context: 
http://openbsd-archive.7691.n7.nabble.com/Dealing-with-PHP-index-files-and-auto-index-tp306957.html
Sent from the openbsd user - misc mailing list archive at Nabble.com.

Reply via email to