Linuxstartway
Linuxstartway

Reputation: 196

Apache regex matching

I'm using Apache+PHP with suphp installed.

I want a regex or a code to make every user account have its own unique php.ini

I tried to put it into my httpd.conf

<Directory "/home/$1/public_html/">
    suphp_Configpath = /home/$1/www
</Directory>

But it didn't work, I hope you could help me with that.

Is there any way to make the $1 variable of the 1st line match the $1 of the 2nd line?

Upvotes: 2

Views: 211

Answers (2)

nwrman
nwrman

Reputation: 364

suPHP by default reads php.ini in a per directory basis

Upvotes: 1

Tom van der Woerdt
Tom van der Woerdt

Reputation: 29975

No, there's no way to do that. However, what you can do is write a script that looks up all users (usually in /home) and generate a long configuration file that sets all their settings. As far as I know, that's what webhosting control panels do to upload their settings.

Upvotes: 1

Related Questions