1

I apologize if this question has already been asked.

I am looking for a solution to make SetEnv use the %2 variable.

Is that even possible?

My vhost:

<VirtualHost *:80>
        ServerName dev.someuri.nl
        ServerAlias *.*.dev.someuri.nl
        VirtualDocumentRoot /home/%2/www/%1
        LogLevel debug

        SetEnv DEVELOP_ENV dev
        SetEnv DEVELOP_NAME %2
</VirtualHost>

1 Answer 1

1

I have found an answer to my problem using SetEnvIf.

<VirtualHost *:80>
        ServerName dev.someuri.nl
        ServerAlias *.*.dev.someuri.nl
        VirtualDocumentRoot /home/%2/www/%1
        LogLevel debug
        SetEnv DEVELOP_ENV dev
        SetEnvIf Host "^(.*)\.(.*)\.dev\.someuri.nl" DEVELOP_NAME=$2
</VirtualHost>

Hope it helps people googling themselves silly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .