February 17th, 2009
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.
6 Comments |
apache, django, opensuse, python |
Permalink
Posted by johannes
February 17th, 2009
Yesterday, I struggled with a problem on my virtual server that Plesk automatically sets /srv/www/vhosts/default/htdocs as the htdocs directory of the Apache.
Anyway, the greatest advantage of the Apache configuration of opensuse is its biggest problem: everything is set up very modularly. There are many things you can edit and install with yast and there are many that you can not. The point is that you will have to decide at one point if you tweak a setting manually and give up searching on Google for the appropriate solution with yast or some rpm manager or whatever the best solution should be.
Then you will haveto start searching in the VERY modularly set up apache config directory /etc/apache2/.
I could solve my problem by deleting the file /etc/apache2/conf.d/zz010_psa_httpd.conf. Files from this directory are included automatically in the file /etc/apache2/default-server.conf into the Apache configuration by the directive
Include /etc/apache2/conf.d/*.conf
/etc/apache2/default-server.conf itself is included into the main config file httpd.conf of Apache by the directive
Include /etc/apache2/default-server.conf
Phew…
No Comments » |
apache, Plesk, Uncategorized |
Permalink
Posted by johannes