DEV Community

Discussion on: PHP-FPM 7.2 on OpenBSD 6.4

Collapse
 
denkoss profile image
denkoss

thx for answer.
default 192.168.0.105 - - [28/Mar/2020:17:37:58 +0300] "GET / HTTP/1.1" 500 0
server default, client 5 (1 active), 192.168.0.105:28051 -> 192.168.0.105, No such file or directory (500 Internal Server Error)

Thread Thread
 
nabbisen profile image
nabbisen

Thank you for your testing.
"No such file or directory" seems the answer.
I think it's possibly because of 1. wrong path, 2. permission (missing?) or 3. the effect of chroot.
chroot defaults to under /var/www. For example, fastcgi socket "/run/php-fpm.sock" in httpd.conf means it must be actually in /var/www/run/php-fpm.sock. It's the same to index.php.
Would you have any idea or clue?

Thread Thread
 
denkoss profile image
denkoss • Edited
  1. Wrong path - which one?
  2. I gave 777 to /var/www/htdocs/ for testing.
  3. yeah, /var/www/htdocs/index.php and /var/www/run/php-fpm.sock

httpd.conf:
ext_ip= ""
server "default" {
listen on $ext_ip port 80
root "/htdocs"
location "
.php" {
fastcgi socket "/run/php-fpm-sock"
}
directory index index.php
}
types {
include "/usr/share/misc/mime.types"
}

I think mistake is stuped, but cannt find it.(

Thread Thread
 
nabbisen profile image
nabbisen

Thanks for the detail.

fastcgi socket "/run/php-fpm-sock"

fastcgi socket "/run/php-fpm.sock" ?

I mean "-sock" should have been ".sock".


Well, empty string, aka your ext_ip, can be listened on. I didn't know it. Interesting.

Thread Thread
 
denkoss profile image
denkoss

I mean "-sock" should have been ".sock". - this is my stupid mistake.))now its work.
ext_ip not empty, its *, I dont know why it not showing here.
Thank you so much!

Thread Thread
 
nabbisen profile image
nabbisen • Edited

Great. You're welcome.

ext_ip not empty, its *, I dont know why it not showing here.

I've found the reason.
it is recognized with * of location "*.php" { as markdown Italic.