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:

<VirtualHost *:80>
        ServerName www.myDomain.com
        ServerAlias myDomain.com *.myDomain.com
        DocumentRoot /usr/local/www/myDomain.com/docroot
        # # for django
        <Location "/">
                SetHandler python-program
                PythonHandler django.core.handlers.modpython
                SetEnv DJANGO_SETTINGS_MODULE linkshare.settings
                PythonDebug On
                PythonPath "['/usr/local/www/myDomain.com/'] + sys.path"
        </Location>
</VirtualHost>

For anyone searching the archives for this topic, the keys to my problem
were the following:

I moved the separate <Location> directive into my <VirtualHost> 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 <Location> 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 <Location> 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:
>
> <VirtualHost 195.26.95.195:80>
>   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
>   <Location />
>     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
>   </Location>
>   <Location "/media">
>     SetHandler None
>   </Location>
>   Alias /static "/var/www/alex.koval.kharkov.ua/PersonalWebSite/
> htdocs/"
>   <Location "/static">
>     SetHandler None
>   </Location>
> </VirtualHost>
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to