Thursday, September 01, 2022

Re: httpd error.log

> This happens when PHP-FPM can’t find the script to execute.
>
> One reason could be that you fiddled with the settings and let PHP-FPM run
> without chroot(2), while httpd(8) is running with chroot(2).
>
> But it might also be a misconfiguration of in httpd.conf. Not sure about
> all of the potential reasons but I occasionally see this error as well on
> a setup which should be configured correctly. I have not checked wether
> some spurious external HTTP requests could be causing this.
>
> My httpd.conf basically looks like this:
> server "servername.example.com" {
> …
> location "*.php" {
> fastcgi socket "/run/php-fpm.sock"
> }
> }
>
> It’s a bit sad that these logs don’t contain timestamps. Makes
> matching against access logs harder.
>
> HTH
> Mike
>
>> Am 01.09.2022 um 10:12 schrieb latincom@vcn.bc.ca:
>>
>> Hello
>>
>> OBSD 7.1 amd64, vultr vm:
>> This is my httpd error.log, does somebody know what is happening please?
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>> Primary script unknown
>

Hello Mike thanks to respond.
My 3 httpd.conf tested individually:

# $OpenBSD: httpd.conf,v 1.22 2020/11/04 10:34:18 denis Exp $

server "agroena.org" {
listen on * port 80
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location * {
block return 302 "https://$HTTP_HOST$REQUEST_URI"
}
}

server "agroena.org" {
listen on * tls port 443
root "/htdocs/agroena.org"
tls {
certificate "/etc/ssl/agroena.org.fullchain.pem"
key "/etc/ssl/private/agroena.org.key"
}
location "/pub/*" {
directory auto index
}
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
}

After the error y tested:
server "consultores.ca" {
listen on * port 80
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location * {
block return 302 "https://$HTTP_HOST$REQUEST_URI"
}
}

server "consultores.ca" {
listen on * tls port 443
root "/htdocs/consultores.ca"
tls {
certificate "/etc/ssl/consultores.ca.fullchain.pem"
key "/etc/ssl/private/consultores.ca.key"
}
location "/pub/*" {
directory auto index
}
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
}

And that one with Dokuwiki, having the same error:
server "historia.agroena.org" {
listen on * port 80
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location * {
block return 302 "https://$HTTP_HOST$REQUEST_URI"
}
}

server "historia.agroena.org" {
listen on * tls port 443
root "/htdocs/historia"
tls {
certificate "/etc/ssl/agroena.org.fullchain.pem"
key "/etc/ssl/private/agroena.org.key"
}

location "/pub/*" {
directory auto index
}

location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location "*.php" {
fastcgi socket "/run/php-fpm.sock"
}
location "*~" {
block drop
}
location match "/kb/data/" {
block drop
}
location match "/kb/conf/" {
block drop
}
location match "/kb/bin/" {
block drop
}
location match "/kb/inc/" {
block drop
}
location match "/kb/vendor/" {
block drop
}
}

PS:
I did not touch php_fpm, i jost did the installation with # rcctl enable
php_fpm and rcctl start pp_fpm i used the correct command indicated in
docs.

No comments:

Post a Comment