On ma, 2007-07-30 at 15:54 +0200, Reinhard Tartler wrote:

> Writing it as django application helps with the following problems:
> 
>  * easy setting up (uses internal webserver and sqlite database) 

Using the internal webserver for production sites is *not* recommended.
It's even discouraged :)

But it takes only a few lines of apache config to set up with
mod_python, here's what I use (on dapper so with django in an odd place)
for the pastebin.

<VirtualHost 81.171.100.21:80>
    ServerName paste.ubuntu-nl.org
    ServerAlias pastebin.ubuntu-nl.org
    AddDefaultCharset utf-8

    <Location />
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE ubuntu_nl.pastebin_settings
        PythonPath "['/usr/local/django', '/home/dennis/web', 
'/usr/local/pygments'] + sys.path"
        PythonDebug on
    </Location>

    ErrorLog /var/log/apache2/ubuntu-nl.org_error.log
    LogLevel warn

    CustomLog /var/log/apache2/ubuntu-nl.org_access.log combined
    ServerSignature Off
</VirtualHost>

-- 
Dennis K.

Time is an illusion, lunchtime doubly so.

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
Ubuntu-motu mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu

Reply via email to