On Mon, Jan 15, 2018 at 02:18:07PM +0100, Hidvégi Gábor wrote:
> >Synopsis: pre defined macros don't work in 'fastcgi socket' configuration 
> >line
> >Category: httpd
> >Environment:
>         System      : OpenBSD 6.2
>         Details     : OpenBSD 6.2 (GENERIC) #132: Tue Oct  3 21:18:21 MDT 2017
> 
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
> 
>         Architecture: OpenBSD.amd64
>         Machine     : amd64
> >Description:
> 
> I cannot use a macro as a parameter of 'fastcgi socket'. This problem is not
> AMD64 only, works on ARM too (cubieboard).
> 
> >How-To-Repeat:
> 
> In httpd.conf I define the macro:
> php="/data/run/php-fpm.sock"
> 
> Later when I try to use it:
> location "*.php" {
>   fastcgi socket $php
> }
> 
> Running 'httpd -n' returns '/etc/httpd.conf:21: syntax error' (of course on
> the fastcgi line). When I replace to 'fastcgi socket
> "/data/run/php-fpm.sock"' it works.
> 
> >Fix:
> 
> It might be either httpd or documentation error (cannot use macros 
> everywhere).
> 
> Gábor Hidvégi
> 
> 
> 

Hi,

I'm not sure if it is a bug, but httpd expects a quoted string for paths.

Try:

        php="\"/data/run/php-fpm.sock\""

        ...

        location "*.php" {
                fastcgi socket $php
        }

-- 
Kind regards,
Hiltjo

Reply via email to