0

Take 2 domains: www.domain.com and sub.domain.com. Each hosted on the same server at /home/www and /home/sub respectively and using a different php.ini file through vhost configuration within lighttpd.

fastcgi.server = ( ".php" =>
  ((
    "bin-path" => "/usr/bin/php5-cgi -c /home/www/php.ini"
  ))
)

$HTTP["host"]=="sub.domain.com" {
  fastcgi.server = ( ".php" =>
    ((
      "bin-path" => "/usr/bin/php5-cgi -c /home/sub/php.ini"
    ))
  )
}

Is it possible to enable www.domain.com/sub to serve the content of sub.domain.com while still using the appropriate php.ini?

The major difference in the php.ini files we are using is the include_path. Is there an alternative way to alter this through the server config by directory or alias? Or within a single php.ini?

The motivation for this is that we only have an SSL certificate for the main www domain, but wish to serve sub content via SSL on the primary domain path.

Using lighttpd on debian.

1 Answers1

1

Don't know if it's still valid, but I followed this a few years ago... sadly I don't use lighttp where I work right now so can't verify it will still work.

http://www.cyberciti.biz/tips/custom-phpini-file-for-each-domain-user.html

Brian
  • 8,418
  • 2
  • 25
  • 32
  • Thanks for the speedy reply. That link looks pretty familiar and I think it's what we followed when setting up the different ini files by subdomain. The requirement now is to achieve this same behaviour by directory or alias instead of subdomain, which the article doesn't cover. – Scott Culcheth Oct 30 '12 at 12:06