mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals.
Adding permission to serve the htdocs directory
In some (sane) Linux distributions (like SuSE 9.0) serving directories other than the
document-root “/srv/www/htdocs” with Apache is switched off by default for
security reasons in “/etc/httpd/httpd.conf” (or for Apache2 “/etc/apache2/httpd.conf”):
# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>
To allow Apache to serve directories outside of the document root you have to add these
lines to “/etc/httpd/httpd.conf” (in SuSE it is recommended to create a new “http.conf.local” and
include this file in “/etc/sysconfig/apache2″):
Alias /wiki/ "/usr/share/moin/htdocs/"
<Directory "/usr/share/moin/htdocs/">
Order deny,allow
Allow from all
</Directory>
ScriptAlias /mywiki "/usr/share/moin/mywiki/cgi-bin/moin.cgi"
<Directory "/usr/share/moin/mywiki/cgi-bin">
Order deny,allow
Allow from all
</Directory>
By Fastserve
|
Posted in Python
| Tags: .htaccess mod rewrite, .htaccess rewrite rule, apache, htaccess, httpd.conf, mac, mod_python, moin, Python, rewrite .htaccess, voodoo |

Most if not all web developers and server administrators struggle with Apache mod_rewrite. It’s very tough and only gets a little easier with practice. Until Now! Get ready to explode your learning curve,…. The following undocumented techniques and methods will allow you to utilize mod_rewrite at an “expert level” by showing you how to unlock its secrets.
By Fastserve
|
Posted in apache, htaccess, htaccess rewrite
| Tags: .htaccess rewrite rule, apache, htaccess, htaccess rewrite, htaccess rewrite url, htaccess tips, htaccess tips tricks, mod_rewrite, rewrite .htaccess, rewriterule |
October 26, 2008 – 4:36 pm
Here are some myths about running CherryPy behind mod_rewrite:
Myth 1: using mod_rewrite will make my site slower
If you’re talking about raw HTTP speed then yes, using mod_rewrite does add a little bit of overhead. On my current laptop, a benchmark of CherryPy exposed gave 460 requests/second (2.2ms/req), and a benchmark of CherryPy running behind Apache [...]
September 20, 2008 – 9:48 am
Do It Yourself SSL Guide
By Stephen Philbin
There are many people who want or need to have the connection between the browser and the Web server encrypted, but haven’t been able to set it up. This guide is intended to help people with the typical Apache on Linux setup to make encrypted connections available with [...]
August 12, 2008 – 3:57 am
Alias /icons/ "/usr/local/dh/apache/template/icons/"
<Directory "/usr/local/dh/apache/template/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# This Alias will project the on-line documentation tree under /manual/
# even if you change the DocumentRoot. Comment it if you don't want to
# provide access to the on-line documentation.
#
Alias /manual/ "/usr/local/dh/apache/template/docs/manual/"
<Directory "/usr/local/dh/apache/template/docs/manual">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#
Files and Cache Expiration
For Apache to send along Expires with your staticly served files, you will need to make sure that mod_expires has been installed on your server. It is fairly standard and none of my servers I checked (that includes OS X’s Apache installation), didn’t have mod_expired on the system. You may have [...]
November 30, 2007 – 4:02 pm
Setting up language negotiation involves
1. developing a convention for naming the different language versions of your file,
2. planning a fallback strategy to deal with requested languages that you don’t support, and
3. setting the appropriate server-side directives to make it all work.