Re: Django on plesk - Virtual Host
Tim wrote: > 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 > > > SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE myproject.settings > PythonPath "['/var/www/django_projects'] + sys.path" > PythonDebug On > > > > Options +Indexes > SetHandler none > > -- > It's a bit of a more general question really, but does this sort of set up work OK, where you send '/' to django but have a sub-path of that served straight from the disk? I need to do something like this to serve my media files when I take my project live, but I was worried it would mean at some point having to create a separate IP address and virtual host to run a server on, rather than just serving everything from the same path. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Django on plesk - Virtual Host
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 SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE myproject.settings PythonPath "['/var/www/django_projects'] + sys.path" PythonDebug On Options +Indexes SetHandler none -- 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 : > > > 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 > > SSLEngine off > > httpdocs> > > php_admin_flag engine off > > > php_admin_flag engine off > > > > SetHandler python-program > PythonHandler mod_python.cgihandler > > > Options -Includes -ExecCGI > > > > 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/) > : > > > ServerName django.domain.fr > SetEnv DJANGO_SETTINGS_MODULE myproject.settings > > > 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 django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Django on plesk - Virtual Host
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 : 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 SSLEngine off php_admin_flag engine off php_admin_flag engine off SetHandler python-program PythonHandler mod_python.cgihandler Options -Includes -ExecCGI 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 from http://www.djangoproject.com/documentation/modpython/) : ServerName django.domain.fr SetEnv DJANGO_SETTINGS_MODULE myproject.settings 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 django-users@googlegroups.com 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 -~--~~~~--~~--~--~---