Tag Info

Hot answers tagged

5

Have you enabled mod_python.load in mods-enabled? You can do this by just creating a softlink to the same file in mods-available.


4

Python 2.6 is available via EPEL. To enable EPEL for your box, just do a: rpm -ivh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm Then, to install Python 2.6: yum install python26 there is also a mod_python from there too: yum install python26-mod_python To find additional packages: yum search python26


3

See if the module was loaded properly by issuing apache2ctl -t -D DUMP_MODULES or apachectl -t -D DUMP_MODULES. If it wasn't, edit your httpd.conf or an included file to include the following (replace lib with lib64 if needed): LoadModule wsgi_module /usr/lib/httpd/modules/mod_wsgi.so Do note that you can't execute any python script with WSGI - it has to ...


3

more easy way to do it a2enmod python


3

You didn't asked for a specific version of ISPConfig so I'll assume you are using ISPConfig 3. I didn't tried that by myself, but I've found here a step-by-step instructions on how to install ispconfig3 + django + mod_wsgi - Django and mod_wsgi | HowToForge Forums If somethings goes wrong you could try reply to the mentioned thread or start a new thread ...


3

I have found mod wsgi to be faster than mod python. I posted a writeup on how to setup Trac with mod_wsgi here


2

For information: There's a discussion about that point at http://trac.edgewall.org/ticket/7490. They are referring to performance issues with KeepAlive in Apache2.x with mod_python. Quoted from follow up 17: with keepalive on we got constant 80% CPU utilization on our server with keepalive off we got constant 15% CPU utilization on our server CPU ...


2

If I were you, I'd look if using mod_wsgi instead of mod_python is possible. (It usually is). mod_python has several issues and is unmaintained. No one has interest in it anymore. mod_wsgi on the other hand is an actively maintained and modern alternative. And there is a binary download available for you. Yes, this is not a direct answer to your question ...


2

Just use an additional repository like the one of the IUS Community Project, which contains the latest release of Python 2.6 and 3.1.


2

I've had similar issues when repeatedly restarting Apache on my laptop (for me it took about 40 restarts); the only solution I found was to restart the computer entirely. Of course, my laptop has 2GB of RAM and a lot more disk space than your server probably does, so you might run into this problem more quickly... basically, I'd avoid restarting Apache too ...


2

This doesn't answer your question, but mod_wsgi has pretty much superseded mod_python. If possible, I'd consider using it http://code.google.com/p/modwsgi/


2

Use the absolute path: /usr/local/bin/python2.5 /path/to/your/script


2

The message is from mod_python, telling you that it was compiled with Python 2.6.5 but the system's Python installation is 2.6.6. It will still work regardless of the version mismatch. Anyway, mod_python hasn't seen any development in a number of years and has been deprecated by most projects in favour of alternatives like mod_wsgi.


2

To answer your question you can set net.netfilter.nf_conntrack_tcp_timeout_established in sysctl.conf The default is like 5 days, which can be dramatically lowered with out affecting any likely 443 traffic. net.ipv4.netfilter.ip_conntrack_max can also be bumped up.


1

You can compile python2.x with another user (i use py26 as username) by wget http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz tar xzvf Python-2.6.7.tgz cd Python-2.6.7 ./configure --prefix=$HOME/python make make install then add $HOME/python/bin to $PATH, so python2.6 only used by py26 user


1

Where's the Django project located? You'll need to point your PythonPath at the project, not necessarily the Django library files. It's configured to look in /usr/local/lib/python2.7/sidt-packages/django/bin/projectname; that should be "site-packages" instead, but confirm that that's where the project files are located (is "projectname" correct?).


1

The following stands out as possibly wrong to me: WSGIApplicationGroup %{ENV:SUBDOMAIN} Why have: RewriteRule . - [E=APPLICATION_GROUP:${tolower:%{SERVER_NAME}}] if you are then not using 'APPLICATION_GROUP'. BTW, have you used: http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Embedded_Or_Daemon_Mode ...


1

Build mod_python against the appropriate version of Python. Better yet, abandon the now-dead mod_python altogether and use mod_wsgi instead.


1

That you are even asking makes me think you are using Windows. Windows binaries for mod_python are only available up to Python 2.5. There are no binaries for mod_python for Python 2.6 and Python 3.X is not supported at all by mod_python. You could build mod_python yourself from source code, but you will need Visual Studio 2008. On most UNIX systems which ...


1

You didn't say which operating system you're running but I see that under Debian it's not supported under Python 2.6 or higher, even in the testing or unstable version. Mod_python is pretty much obsolete. Most people have switched to mod_wsgi and are building Python apps using wsgi compatible frameworks such as Django, Pylons etc. ...


1

You need to build it using python 2.6's development libraries afaik, but a much better solution is to use FastCGI/SCGI, which will let you run not only multiple versions of python on apache, but also multiple versions of php, ruby, and other webapps, even if you decide you want to move to lighttpd, nginx, or some other webserver too. It's not without ...


1

Start by reading: http://code.google.com/p/modwsgi/wiki/InstallationIssues http://code.google.com/p/modwsgi/wiki/ApplicationIssues http://code.google.com/p/modwsgi/wiki/DebuggingTechniques http://code.google.com/p/modwsgi/wiki/WhereToGetHelp Various reasons for crashes are documented and also pointers to how to configure Apache/mod_wsgi to get ...


1

This may not be the answer you want to hear but here goes anyway :) If you run your Django site under mod_wsgi instead of mod_python you will see multiple benefits: Under mod_wsgi you can run in daemon mode, meaning your Django site will be isolated in its own process. This means environment variables won't be set globally in the Apache environment ...


1

Django recommends mod_wsgi for productive installations. See http://docs.djangoproject.com/en/dev/topics/install/#install-apache-and-mod-wsgi for more informations. Maybe you give this Apache module a try and see if the issue remains.


1

On ubuntu, you need to: apt-get install libapache2-mod-python


1

I have a similar setup. The root is handled by mod_python which is running an instance of trac and /docs is handled by dokuwiki which uses php. The only way to make this work was to use a LocationMatch directive that I had to negate because trac uses quite a numer of pseudo-directories: <LocationMatch "^/(?!docs)"> SetHandler mod_python ...


1

Pulled from here: Download the apache source code for the version you're targeting, and unzip it to "C:\Apache" After installing python, make sure it is in your PATH The SVN trunk will incluce a Windows build script for mod_python that builds two products, mod_python itself and "PSP", which stands for "Python Server Pages". The PSP build fails for me ...


1

It also depends on your database. Which database server are you using? Is it on the same host as your Trac server? Are you sure the CPU usage is coming from Apache? Personally I've found trac runs better on mod_fastcgi, and even better on mod_wsgi. We're using a VM on a modestly spec'd VM host to host our Trac instance and it's in constant use (as in being ...


1

If you have mod_deflate enabled, try disabling it.


1

There was also a similar question on the Trac ML, probably it help you (in particular the last mail with a possible configuration of Apache): ML Mail (Google Groups) " Trac 0.11 so slow!!!!!" Edit Probably, but as I didn't have such problems, this could be also from interest for you: performance and garbage collection. However, I don't think this is the ...



Only top voted, non community-wiki answers of a minimum length are eligible