httpd serving php

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

httpd serving php

Teno Deuter
Dear support team,

in a OpenBSD 6.3 installation with php packges added, I have the
following httpd configuartion:

server "domain" {
        listen on * tls port 443
        listen on :: tls port 443
        tls {
                certificate "/etc/ssl/private/server.pem"
                key "/etc/ssl/server.key"
        }

        directory index index.php

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

                root "/htdocs/domain"

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

the above generates a 500 error!

Also, no '/run/php-fpm.sock' exists!

Thank you for your help

Reply | Threaded
Open this post in threaded view
|

Re: httpd serving php

Daniel Corbe
at 11:40 AM, Teno Deuter <[hidden email]> wrote:

> Dear support team,
>
> in a OpenBSD 6.3 installation with php packges added, I have the
> following httpd configuartion:
>
> server "domain" {
>         listen on * tls port 443
>         listen on :: tls port 443
>         tls {
>                 certificate "/etc/ssl/private/server.pem"
>                 key "/etc/ssl/server.key"
>         }
>
>         directory index index.php
>
>         location "/pub/*" {
>                 directory auto index
>         }
>
>                 root "/htdocs/domain"
>
>         location "*.php" {
>         fastcgi socket "/run/php-fpm.sock"
>         }
> }
>
> the above generates a 500 error!
>
> Also, no '/run/php-fpm.sock' exists!
>
> Thank you for your help

Did you start php-fpm?


Reply | Threaded
Open this post in threaded view
|

Re: httpd serving php

Teno Deuter
sorry, if you mean the following:

rcctl enable php56_fpm

then yes, I did it but I still get a 500 error!

On Fri, Jul 6, 2018 at 6:07 PM, Daniel Corbe <[hidden email]> wrote:

> at 11:40 AM, Teno Deuter <[hidden email]> wrote:
>
>> Dear support team,
>>
>> in a OpenBSD 6.3 installation with php packges added, I have the
>> following httpd configuartion:
>>
>> server "domain" {
>>         listen on * tls port 443
>>         listen on :: tls port 443
>>         tls {
>>                 certificate "/etc/ssl/private/server.pem"
>>                 key "/etc/ssl/server.key"
>>         }
>>
>>         directory index index.php
>>
>>         location "/pub/*" {
>>                 directory auto index
>>         }
>>
>>                 root "/htdocs/domain"
>>
>>         location "*.php" {
>>         fastcgi socket "/run/php-fpm.sock"
>>         }
>> }
>>
>> the above generates a 500 error!
>>
>> Also, no '/run/php-fpm.sock' exists!
>>
>> Thank you for your help
>
>
> Did you start php-fpm?
>
>

Reply | Threaded
Open this post in threaded view
|

Re: httpd serving php

Edgar Pettijohn III-2
In reply to this post by Teno Deuter
enable just enables it you need
rcctl start php56_fpm
On Jul 6, 2018 11:31 AM, Teno Deuter <[hidden email]> wrote:

>
> sorry, if you mean the following:
>
> rcctl enable php56_fpm
>
> then yes, I did it but I still get a 500 error!
>
> On Fri, Jul 6, 2018 at 6:07 PM, Daniel Corbe <[hidden email]> wrote:
> > at 11:40 AM, Teno Deuter <[hidden email]> wrote:
> >
> >> Dear support team,
> >>
> >> in a OpenBSD 6.3 installation with php packges added, I have the
> >> following httpd configuartion:
> >>
> >> server "domain" {
> >>         listen on * tls port 443
> >>         listen on :: tls port 443
> >>         tls {
> >>                 certificate "/etc/ssl/private/server.pem"
> >>                 key "/etc/ssl/server.key"
> >>         }
> >>
> >>         directory index index.php
> >>
> >>         location "/pub/*" {
> >>                 directory auto index
> >>         }
> >>
> >>                 root "/htdocs/domain"
> >>
> >>         location "*.php" {
> >>         fastcgi socket "/run/php-fpm.sock"
> >>         }
> >> }
> >>
> >> the above generates a 500 error!
> >>
> >> Also, no '/run/php-fpm.sock' exists!
> >>
> >> Thank you for your help
> >
> >
> > Did you start php-fpm?
> >
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: httpd serving php

Selveste1
In reply to this post by Teno Deuter
One thing is to enable it, but if you run
rcctl start php56_fpm
Does that change your problem?

/Henrik

On 6 July 2018 18.31.56 CEST, Teno Deuter <[hidden email]> wrote:

>sorry, if you mean the following:
>
>rcctl enable php56_fpm
>
>then yes, I did it but I still get a 500 error!
>
>On Fri, Jul 6, 2018 at 6:07 PM, Daniel Corbe <[hidden email]> wrote:
>> at 11:40 AM, Teno Deuter <[hidden email]> wrote:
>>
>>> Dear support team,
>>>
>>> in a OpenBSD 6.3 installation with php packges added, I have the
>>> following httpd configuartion:
>>>
>>> server "domain" {
>>>         listen on * tls port 443
>>>         listen on :: tls port 443
>>>         tls {
>>>                 certificate "/etc/ssl/private/server.pem"
>>>                 key "/etc/ssl/server.key"
>>>         }
>>>
>>>         directory index index.php
>>>
>>>         location "/pub/*" {
>>>                 directory auto index
>>>         }
>>>
>>>                 root "/htdocs/domain"
>>>
>>>         location "*.php" {
>>>         fastcgi socket "/run/php-fpm.sock"
>>>         }
>>> }
>>>
>>> the above generates a 500 error!
>>>
>>> Also, no '/run/php-fpm.sock' exists!
>>>
>>> Thank you for your help
>>
>>
>> Did you start php-fpm?
>>
>>

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply | Threaded
Open this post in threaded view
|

Re: httpd serving php

Stuart Henderson
In reply to this post by Teno Deuter
On 2018-07-06, Teno Deuter <[hidden email]> wrote:
> Dear support team,

There is no "support team" ..

> in a OpenBSD 6.3 installation with php packges added, I have the
> following httpd configuartion:
>
> server "domain" {
>         listen on * tls port 443
>         listen on :: tls port 443
>         tls {
>                 certificate "/etc/ssl/private/server.pem"
>                 key "/etc/ssl/server.key"
>         }
>
>         directory index index.php
>
>         location "/pub/*" {
>                 directory auto index
>         }
>
>                 root "/htdocs/domain"
>
>         location "*.php" {
>         fastcgi socket "/run/php-fpm.sock"
>         }
> }
>
> the above generates a 500 error!

Other replies explain this, but one extra:

> Also, no '/run/php-fpm.sock' exists!

This is relative to the chroot jail, by default /var/www, so it would
look like this:

$ ls -l /var/www/run/php-fpm.sock                                                            
srw-rw----  1 www  www  0 Jul  5 21:42 /var/www/run/php-fpm.sock