View Full Version : mod_python
houndbee
04-13-2005, 12:13 PM
I need to deploy a python application, I want to know if installing the default FC3 mod_python rpm will work with the apache that ships with Interworx?
IWorx-Chris
04-13-2005, 03:25 PM
It should be but it's never been tried or tested. Most apache modules obtained in RPM format for Apache 2.0.41+ should work.
Chris
WebXtrA
05-29-2006, 02:25 PM
Dear houndbee,
Did it work out? Since we would like to install it on our servers as well.
Thanks,
Rámon
houndbee
05-30-2006, 04:48 AM
Dear houndbee,
Did it work out? Since we would like to install it on our servers as well.
Thanks,
Rámon
Hi Ramon,
I never really got around to installing mod_python, just hosted the stuff with a friend who had it running already.
Cheers,
-K
WebXtrA
07-11-2006, 12:03 PM
I can confirm it's working here.
Just a simple "yum install mod_python" and a "service httpd restart" does the job.
And than adding this to the python.conf in /etc/httpd/conf.d:
<Directory /home/domainco/domain.com/html/>
SetHandler mod_python
PythonHandler mod_python.publisher
</Directory>
WebXtrA
07-11-2006, 12:58 PM
I would like to add this to the standard http conf's of the sites:
# begin Pyhton
<Directory /home/domainco/domain.com/html/python>
SetHandler mod_python
PythonHandler mod_python.publisher
</Directory>
ScriptAlias /python/ /home/domainco/domain.com/html/python/
# end Pyhton
Is this possible? Can I add it somewhere so that this will be written on default?
And is it possible that the /python dir will be created on site creation?
Thanks,
Rámon
Gamersea
07-12-2006, 07:07 AM
Which scripts use Python?
Mabye there is some nice forum software for it....
Edit: I have taken a look at Hotscripts but there are not many scripts for Python.... (or do you have to look somewhere else?)
WebXtrA
07-14-2006, 04:49 AM
Django
http://www.djangoproject.com/
Gamersea
07-14-2006, 05:27 AM
Looks good!
WebXtrA
07-19-2006, 10:06 AM
I would like to add this to the standard http conf's of the sites:
# begin Pyhton
<Directory /home/domainco/domain.com/html/python>
SetHandler mod_python
PythonHandler mod_python.publisher
</Directory>
ScriptAlias /python/ /home/domainco/domain.com/html/python/
# end Pyhton
Is this possible? Can I add it somewhere so that this will be written on default?
And is it possible that the /python dir will be created on site creation?
Thanks,
Rámon
I found it in the documentation, I'll have to edit /home/interworx/etc/vhost-base.conf
It looks like this now:
<VirtualHost <<IP_ADDR>>:<<PORT>>>
<<SUEXEC>>
DocumentRoot <<WEBROOT>>
ServerName <<DOMAIN>>
ServerAlias <<ALIASES>> *.<<DOMAIN>>
ServerAdmin webmaster@<<DOMAIN>>
# subdomain logic
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www\.<<ESCDOMAIN>> [NC]
RewriteCond %{HTTP_HOST} !^<<ESCDOMAIN>> [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-]+)\.<<ESCDOMAIN>> [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-]+)\.<<ESCDOMAIN>>/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
# end subdomain logic
ErrorLog <<ERRORLOG>>
CustomLog <<XFERLOG>> combined
php_admin_flag engine On
# cgi: <<CGISTATUS>> don't edit between this and the "end cgi" comment below
<Directory <<WEBROOT>>>
<<CGI1>>
</Directory>
<<CGI2>>
# end cgi
</VirtualHost>
I think that I have to change it in this:
<VirtualHost <<IP_ADDR>>:<<PORT>>>
<<SUEXEC>>
DocumentRoot <<WEBROOT>>
ServerName <<DOMAIN>>
ServerAlias <<ALIASES>> *.<<DOMAIN>>
ServerAdmin webmaster@<<DOMAIN>>
# subdomain logic
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www\.<<ESCDOMAIN>> [NC]
RewriteCond %{HTTP_HOST} !^<<ESCDOMAIN>> [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-]+)\.<<ESCDOMAIN>> [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-]+)\.<<ESCDOMAIN>>/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
# end subdomain logic
ErrorLog <<ERRORLOG>>
CustomLog <<XFERLOG>> combined
php_admin_flag engine On
# cgi: <<CGISTATUS>> don't edit between this and the "end cgi" comment below
<Directory <<WEBROOT>>>
<<CGI1>>
</Directory>
<<CGI2>>
# end cgi
# begin Pyhton
<Directory <<WEBROOT>>/python>
SetHandler mod_python
PythonHandler mod_python.publisher
</Directory>
ScriptAlias /python/ <<WEBROOT>>/python/
# end Pyhton
</VirtualHost>
Can I just create the map python in /usr/local/interworx/etc/skel/ ? Or should I do more?
IWorx-Chris
07-19-2006, 10:26 AM
Hi Ramon,
Yes, you should just need to create the python directory in the InterWorx skel directory. The contents of that directory will get copied over to any newly created SiteWorx account.
Socheat
WebXtrA
07-19-2006, 10:35 AM
OK, thanks. The python map should be owned bij the user "iworx" correct? In the skel map?
Does the modified "vhost-base.conf" looks OK? Or did I make a mistake?
-Rámon
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.