Re: fundamental issues with configuring Apache and mod_python
Thanks I took your configuration and was able to configure mine accordingly. I still don't completely understand it, but at least I can get to the admin page and the poll page. And, now I can finish the tutorial. I don't think that I have some permissions correct though because my pages don't have any style. So, I think I must need to open access to the Apache user to wherever the style sheets are stored. Here's the configuration that worked for me: ServerName www.myDomain.com ServerAlias myDomain.com *.myDomain.com DocumentRoot /usr/local/www/myDomain.com/docroot # # for django SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE linkshare.settings PythonDebug On PythonPath "['/usr/local/www/myDomain.com/'] + sys.path" For anyone searching the archives for this topic, the keys to my problem were the following: I moved the separate directive into my directory. So, now the are combined. This next part is a complete assumption. But, this is how it looks like to me. The value for the directive is appended to the DocumentRoot directive to construct the path on the file system that you want Python to handle. So, I set mine to "/". The "SetEnv DJANGO_SETTINGS_MODULE linkshare.settings" line is either apparently relative to the path you add to the directive, which is appended to the the DocumentRoot, or it is appended to the PythonPath. Thanks Alex On 1/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hi! > > On Jan 31, 6:47 pm, "backdoc" <[EMAIL PROTECTED]> wrote: > > I am trying to experiment with django. And, I'm at a loss. My > > problem is that I just don't conceptually understand how to match up > > where everything is supposed to go on the filesystem and how to > > configure Apache and mod_python to be aware of it. > > Its not clear for me where the problem is (since you see /polls). > Just for reference here is config of my site: > > > ServerName alex.koval.kharkov.ua > ServerAdmin [EMAIL PROTECTED] > CustomLog /var/log/apache2/alex.koval.kharkov.ua-access_log combined > DocumentRoot /var/www/alex.koval.kharkov.ua/PersonalWebSite/htdocs > > SetHandler python-program > PythonHandler django.core.handlers.modpython > PythonPath "sys.path+['/var/www/alex.koval.kharkov.ua/ > PersonalWebSite/',' > /var/www/alex.koval.kharkov.ua/']" > SetEnv DJANGO_SETTINGS_MODULE PersonalWebSite.settings > SetEnv LANG en_EN > SetEnv LC_ALL C > PythonDebug Off > > > SetHandler None > > Alias /static "/var/www/alex.koval.kharkov.ua/PersonalWebSite/ > htdocs/" > > SetHandler None > > > > Source code of my site can be seen here: > http://code.koval.kharkov.ua/browser/PersonalWebSite/trunk > > > > > > --~--~-~--~~~---~--~~ 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: fundamental issues with configuring Apache and mod_python
Hi! On Jan 31, 6:47 pm, "backdoc" <[EMAIL PROTECTED]> wrote: > I am trying to experiment with django. And, I'm at a loss. My > problem is that I just don't conceptually understand how to match up > where everything is supposed to go on the filesystem and how to > configure Apache and mod_python to be aware of it. Its not clear for me where the problem is (since you see /polls). Just for reference here is config of my site: ServerName alex.koval.kharkov.ua ServerAdmin [EMAIL PROTECTED] CustomLog /var/log/apache2/alex.koval.kharkov.ua-access_log combined DocumentRoot /var/www/alex.koval.kharkov.ua/PersonalWebSite/htdocs SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "sys.path+['/var/www/alex.koval.kharkov.ua/ PersonalWebSite/',' /var/www/alex.koval.kharkov.ua/']" SetEnv DJANGO_SETTINGS_MODULE PersonalWebSite.settings SetEnv LANG en_EN SetEnv LC_ALL C PythonDebug Off SetHandler None Alias /static "/var/www/alex.koval.kharkov.ua/PersonalWebSite/ htdocs/" SetHandler None Source code of my site can be seen here: http://code.koval.kharkov.ua/browser/PersonalWebSite/trunk --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
fundamental issues with configuring Apache and mod_python
I am trying to experiment with django. And, I'm at a loss. My problem is that I just don't conceptually understand how to match up where everything is supposed to go on the filesystem and how to configure Apache and mod_python to be aware of it. I am running Apache2 on Ubuntu Edgy with mod_python 3.2.8. And, I have gotten my Django pages to render in a text based web browser (with the builtin web server). Here's a little information about what my file system looks like: /usr/local/www/myDomain.com/docroot(where my HTML went before Django -- my DocumentRoot) /usr/local/www/myDomain.com/linkshare (where I put my Django project files) /usr/local/www/myDomain.com/linkshare/polls(where I put the polls app I've created from the tutorial) /usr/local/lib/python2.4/site-packages/django(where I installed Django) So, I am confused what I should use for the paths for some of the directives (look for the 3 places I put "whatGoesHere" in the snippet from apache2.conf below): SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE whatGoesHere.settings PythonDebug On DocumentRoot /usr/local/www/myDomain.com/docroot ServerName www.myDomain.com ServerAlias myDomain.com *. myDomain.com PythonPath "['whatGoesHere'] + sys.path" Do I need a DocumentRoot directive in my VirtualHost? My urls.py file looks like the following. I assume it's right because http://localhost:8000/polls works in my text browser. Although, http://localhost:8000/ doesn't render. I'm not sure how to get a default view. urlpatterns = patterns('', (r'^polls/$', 'linkshare.polls.views.index'), (r'^polls/(?P\d+)/$', 'linkshare.polls.views.detail'), (r'^polls/(?P\d+)/results/$', 'linkshare.polls.views.results'), (r'^polls/(?P\d+)/vote/$', 'linkshare.polls.views.vote'), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---