https://issues.apache.org/bugzilla/show_bug.cgi?id=56466

            Bug ID: 56466
           Summary: issue with mod_macro parser
           Product: Apache httpd-2
           Version: 2.4.9
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Other Modules
          Assignee: [email protected]
          Reporter: [email protected]

Intro: Today, I was clearing the configuration file of Apache HTTPD and before
doing this I have upgraded Apache HTTPD to the latest version (2.4.9) to be
able to use unix socket option.
But, I've faced some crushes while I clear the configuration file. Fortunately,
I've found the source of the issue but it was really hard for me to detect it
since I had also done more tuning operations today.
So, I was not sure about the bug, and now I am.

The source of the issue is mod_macro. May it is a bug or maybe it does not work
as I have supposed to be.
Crush logs are long. So, I am posting other footprints instead.

Footprint 1:
[Mon Apr 28 11:38:51.217549 2014] [macro:warn] [pid 16400:tid 140305156634368]
macro 'modenull' multiply defined: \xa0\x92B, redefined on line 559 of
"/etc/httpd/httpd.conf"
[Mon Apr 28 11:37:01.830618 2014] [macro:warn] [pid 15815:tid 140126534055680]
macro 'modenull' multiply defined: defined on line 559 of
"/etc/httpd/httpd.conf", redefined on line 559 of "/etc/httpd/httpd.conf"
- I actually did not redefine macros.

Footprint 2:
AH00082: an unknown filter was not added: reqtimeout
- mod_reqtimeout was actually loaded.

Footprint 3:
AH01797: client denied by server configuration: /srv/www/
- mod_access_compat has access already.

And so on... It just breaks loading of other listed modules.
This is what I've used as macro definitions.

-----------------------------------------------------

Define  root_www   /srv/www/
Define  root_ssl   /etc/ssl/certs/

<Macro ConnectionDefault $id>
# noting to do
</Macro>

<Macro ModeNull $id>
# mod_php: noting to do
</Macro>

<Macro ModePHPFPM $id>
    ProxyPassMatch ^/(.*\.php)$
unix:/var/run/php-fpm.sock|fcgi://127.0.0.1:9000${root_www}/$id/@g
</Macro>

<Macro ModeHHVM $id>
    ProxyPassMatch ^/(.*\.php)$
unix:/var/run/hhvm/hhvm.sock|fcgi://127.0.0.1:9000${root_www}/$id/@g
</Macro>

<Macro ConnectionSSL $id>
    SSLEngine On
    SSLCertificateFile    "${root_ssl}$id.crt"
    SSLCertificateKeyFile "${root_ssl}$id.key"
    SSLCACertificateFile  "${root_ssl}ca-certificates.crt"
</Macro>

<Macro VHost $id $mode $port $connection $name $alias>
    <VirtualHost *:$port>
        ServerName   $name
        ServerAlias  $alias

        Use Connection$connection $id

        DocumentRoot "${root_www}/$id/"
        <Directory "${root_www}/$id/">
            IncludeOptional ${root_www}/$id/.htaccess
            AllowOverride None
            Allow from all
        </Directory>
        ErrorLog /var/log/httpd/$id/error.log
        CustomLog /var/log/httpd/$id/access.log combined

        Use Mode$mode $id
    </VirtualHost>
</Macro>

# Use VHost example Null   80  Default example.com www.example.com
# Use VHost example PHPFPM 443 SSL     example.com www.example.com
# Use VHost example HHVM   80  Default example.com www.example.com

UndefMacro ConnectionDefault
UndefMacro ConnectionSSL
UndefMacro ModeNull
UndefMacro ModePHPFPM
UndefMacro ModeHHVM
UndefMacro VHost

-----------------------------------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to