Today I came upon a problem when I wanted to integrate a Django project into my Apache via mod_python on my OpenSUSE virtual server.
I put the snippet I need for Django into a separate config file called django.conf into the folder /etc/apache2/conf.d/ from which all files are automatically loaded whenever Apache starts.
Everytime I wanted to start my Apache it said
Syntax error on line 6 of /etc/apache2/conf.d/django.conf:
Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration
This seems to be a problem with the Apache configuration of OpenSUSE as mod_env which provides the SetEnv directive is installed but disabled.
Solution:
- Start yast (from the command line)
- Select “Network Services”
- Select “HTTP Server”
- Select “Server Modules”
- Select “Network Services”
- Scroll to “env”
- Select “Toggle Status”
- Select “Finish”
Done.