Environment Variables for Apache

Hey guys,

Where do I setup these in OpenSUSE 13.2?

I tried putting them in /etc/sysconfig/apache2 as:

export VAR_NAME=/path/to/folder

But Apache doesn’t get it, I also tried in /etc/init.d/apache2 and httpd.conf, but nothing.

I tried enabling mod_env just to be in the safe side, but nothing.

Any ideas?

Thanks,

Try adding;

SetEnv variable_name variable_content

In your /etc/apache2/default-server.conf at the end or in your vhost file in the virtualhost section if you have multiple hosts and want to set things per host. Remember to have the env module loaded when you do so.