I've got a couple Django apps running on Plesk. It's not the greatest
but it works.

First, after you set up your subdomain, you'll need to create the
file:
/var/www/vhosts/ domain.fr/subdomains/django/conf/vhost.conf

Here's the contents of mine:
------
    DocumentRoot /var/www/django_projects/myproject

    <Location "/">
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE myproject.settings
        PythonPath "['/var/www/django_projects'] + sys.path"
        PythonDebug On
    </Location>

    <Location "/media/">
        Options +Indexes
        SetHandler none
    </Location>
------

In my set up, the media folder is all the images, css and js files.

After you create the file, you have to go back into the plesk control
panel and go into your subdomain and save it again (even if you don't
change anything). When you put the vhost.conf file in the directory,
plesk doesn't automatically load it so by resaving your subdomain
settings, you'll tell it to find the file.

I hope this helps.

Tim

On Apr 11, 9:27 am, martyn <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm just copying my django project on my Fedora-Plesk server and
> something is missing in my mind.
> All my projects are Virtual hosts.
>
> My main domain :
> domain.fr
>
> My django project :
> django.domain.fr
>
> And my medias :
> medias.domain.fr
>
> On plesk, you cannot write directly on the httpd.conf because it's
> overwriten by plesk itself, you have to add other vhost.conf files on
> each subdomains.
>
> Plesk did that for me into the httpd.conf file :
>
> <VirtualHost 92.92.92.192:80>
>         ServerName   django.domain.fr:80
>         DocumentRoot /var/www/vhosts/domain.fr/subdomains/django/
> httpdocs
>         CustomLog  /var/www/vhosts/domain.fr/statistics/logs/
> access_log plesklog
>         ErrorLog   /var/www/vhosts/domain.fr/statistics/logs/error_log
>         <IfModule mod_ssl.c>
>                 SSLEngine off
>         </IfModule>
>         <Directory  /var/www/vhosts/domain.fr/subdomains/django/
> httpdocs>
>         <IfModule sapi_apache2.c>
>                 php_admin_flag engine off
>         </IfModule>
>         <IfModule mod_php5.c>
>                 php_admin_flag engine off
>         </IfModule>
>         <IfModule mod_python.c>
>         <Files ~ (\.py$)>
>                 SetHandler python-program
>                 PythonHandler   mod_python.cgihandler
>         </Files>
>         </IfModule>
>                 Options -Includes -ExecCGI
>         </Directory>
> </VirtualHost>
>
> I'm not allow to modify this file.
> In my own vhost.conf, what do I have to write ?
> I tried this (and other derivated 
> fromhttp://www.djangoproject.com/documentation/modpython/)
> :
>
> <VirtualHost  92.92.92.192:80>
>     ServerName django.domain.fr
>     SetEnv DJANGO_SETTINGS_MODULE myproject.settings
> </VirtualHost>
>
> With no success.
> I really want to improve my knowledge into Django Deployement on
> apache.
> Thanks in advance.
>
> Martyn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to