Ошибка с python-eggs

Posted by & filed under Apache.

Получил следующую ошибку: «ExtractionError: Can’t extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: ‘//.python-eggs’ The Python egg cache directory is currently set to: //.python-eggs Perhaps your account does not have write access to this directory? You can change the cache… Read more »

Apache и конфиги в CentOS

Posted by & filed under Apache.

Проверка как apache разобрал конфигурационный файл для CentOS: httpd -S проверка правильности синтакиса файла apachectl configtest

Аналог phpinfo в Python

Posted by & filed under Apache, python.

Качаем этот файл: http://www.modpython.org/live/current/lib/python/mod_python/testhandler.py (Копию на всякий пожарный положу сюда) сохраняем на винте, там где находится наш сайт. В настройках апача меняем PythonHandler на наш testhandler: PythonHandler testhandler запускаем наш сайт и видим подобие того, что выдает phpinfo

Mod_python, объект Request

Posted by & filed under Apache, python.

req.uri — путь без домена и аргументов req.args — арргументы req.get(«argName»,»»).filename — имя загруженного файла req.hostname — имя хоста

Одна точка входа для FastCGI (Python)

Posted by & filed under Apache.

Апачевский конфиг позволяющий создать одну точку входа <VirtualHost z2.world.com:80> ServerAdmin a@b.c DocumentRoot /var/www/z2 ServerName z2.world.com:80 ErrorLog /var/www/log/error.log SetHandler fastcgi-script ScriptAliasMatch ^(/.*)$ /var/www/z2/publisher.py$1 <Directory /> Options FollowSymLinks +ExecCGI AllowOverride All </Directory> </VirtualHost>