rzx10r
rzx10r

Reputation: 134

PHP-FPM + mod_vhost_alias

How it's possible to make both work together vhost_alias works fine without proxypassmatch and fpm works fine in a exclusive vhost, its possible to use % from vhost_alias?

<IfModule mod_vhost_alias.c>
      <VirtualHost *:80>
             ServerAlias *.*.in
             UseCanonicalName Off
             VirtualDocumentRoot /var/www/html/%2/%1/public
             ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/%2/%1/public/$1
      </VirtualHost>
    </IfModule>

Upvotes: 1

Views: 379

Answers (1)

covener
covener

Reputation: 17886

You can't access those variables in any directives other than mod_vhost_aliases' own.

  • You could use the SetHandler form of mod_proxy_fcgi which lets other modules do the mapping from URL to filesystem --check the proxy_fcgi manual.
  • You could use mod_rewrite to pick apart the hostname in the same way as mod_vhost_alias, then either set environment variables and use ProxyPassInterpolateEnv or just proxy directly from mod_rewrite.

Upvotes: 0

Related Questions