Where exactly is the snippet file containing the Apache configuration
which you have added?

How is this being included into the main Apache configuration?

Try adding a syntax error into the snippet file, ie., add:

  XXX

Then try and restart Apache. If it doesn't complain with an error in
Apache error logs, then the configuration file isn't even being read
in.

If neither site is showing anything, then all I can guess is that the
configuration isn't even being used in the first place.

Graham

garagefan wrote:
> i do appreciate all your assistance and am growing to understand the
> server side a bit more. you're right about the documentation being...
> light...
>
> i've taken what you posted and have not seen a difference at either of
> the websites mentioned the main page results in the base fedora test
> page saying that the server is running. the other pages result in a
> page not found, ie: kennethdavid.net/blog results in this. error logs
> say the same thing, file not found... except for one error, the below
> being located in the error log for kennethdavid.net:
>
> [Sun Jan 04 15:55:56 2009] [error] [client 71.230.64.77] Directory
> index forbidden by Options directive: /home/kdwadmin/public_html/
>
> is this possibly what you've mentioned in regards to apache having
> permission to access? permissions for everything are either root as
> owner/group and kdwadmin as owner/group. the only difference is a
> directory in the images directory i had changed to be group apache so
> that it had write privileges for the gallery app to upload images to.
> Also worth noting is that the files in the image directory do indeed
> show up in the browser
>
> I'm not seeing any permissions based errors in the httpd error logs
> either, though i could be wrong... here is the error_log from the
> latest restart
>
>
> [Sun Jan 04 15:55:51 2009] [notice] caught SIGTERM, shutting down
> [Sun Jan 04 15:55:51 2009] [notice] suEXEC mechanism enabled
> (wrapper: /usr/sbin/suexec)
> [Sun Jan 04 15:55:51 2009] [warn] No JkLogFile defined in httpd.conf.
> Using default /etc/httpd/logs/mod_jk.log
> [Sun Jan 04 15:55:51 2009] [warn] No JkShmFile defined in httpd.conf.
> Using default /etc/httpd/logs/jk-runtime-status
> [Sun Jan 04 15:55:51 2009] [notice] Digest: generating secret for
> digest authentication ...
> [Sun Jan 04 15:55:51 2009] [notice] Digest: done
> [Sun Jan 04 15:55:51 2009] [warn] No JkLogFile defined in httpd.conf.
> Using default /etc/httpd/logs/mod_jk.log
> [Sun Jan 04 15:55:51 2009] [warn] No JkShmFile defined in httpd.conf.
> Using default /etc/httpd/logs/jk-runtime-status
> [Sun Jan 04 15:55:51 2009] [notice] mod_python: Creating 4 session
> mutexes based on 50 max processes and 0 max threads.
> [Sun Jan 04 15:55:51 2009] [notice] mod_python: using mutex_directory /
> tmp
> [Sun Jan 04 15:55:51 2009] [notice] Apache/2.2.8 (Unix) DAV/2 mod_jk/
> 1.2.26 PHP/5.2.6 mod_python/3.3.1 Python/2.5 mod_ssl/2.2.8 OpenSSL/
> 0.9.8b mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal
> operations
>
> I do currently have two separate IP addresses for the sites, could
> this be causing the issue? it doesn't seem like it would
>
> thanks again for the help, it really is appreciated.
>
> -Ken
>
> On Jan 4, 12:56�am, Graham Dumpleton <graham.dumple...@gmail.com>
> wrote:
> > On Jan 4, 3:11�pm, garagefan <monkeygar...@gmail.com> wrote:
> >
> >
> >
> > > this is rather aggravating as i'm unsure what exactly I need to give
> > > you to help me :/ this isn't your fault at all, as i'm an
> > > unexperienced with working with servers, mod_python, python and
> > > django.
> >
> > > i am learning all this as I go along.
> >
> > > i've got two websites on my server, both with different IP addresses
> > > (obviously)
> >
> > > they reside in
> >
> > > /home/kdwadmin
> > > and
> > > /home/kdwadmin2
> >
> > > the first directory above has another folder in it w/ my django files.
> > > full directory is /home/kdwadmin/mysite
> >
> > > nevermind that my django files are placed in an inappropriate spot,
> >
> > > i will be taking care of that shortly, /home/django/kdwadmin will
> > > contain the apps for the first site while there will be no directory
> > > for the second site at this time.
> >
> > > my <Location>'s were set up as per the djangoprojects.com tutorial
> >
> > > the first directory, that includes the django apps, is for website
> > > kennethdavid.net, the second for carclubhub.com.
> >
> > > so what i need to do is set up a virtual host for both sites, one that
> > > will point kennethdavid.net/* to the django app and another that will
> > > say carclubhub.com/* SetHandler None
> >
> > > there is only one port under "Listen" in the apache config file.
> > > Should i create an ip specific listen for each website? and have :80
> > > for one and :81 for the other and would that allow me to create two
> > > VirtualHosts? one for each port?
> >
> > Sorry if I have come across as a bit short with you. Feeling a bit
> > under pressure at the moment with a report I have to do for work. I'll
> > try and explain things in a bit better detail for you. Hopefully it
> > will help with understanding Django documentation, which in my opinion
> > is not too clear in some areas in relation to mod_python setup. :-)
> >
> > The whole point of virtual hosts as supported by the 'Host' header in
> > HTTP/1.1 requests, is that it is possible to support multiple named
> > hosts on a single IP address/port. Thus it is sufficient to have a
> > single Listen directive for just port 80. As you already had, you do
> > also need to define the NameVirtualHost directive appropriately to
> > enable virtual host resolution on that port. The wildcard, ie., '*'
> > means that this virtual host resolution will occur no matter what IP
> > address was used. So the directives:
> >
> > � Listen 80
> > � NameVirtualHost *:80
> >
> > would be fine.
> >
> > The next thing is to define a VirtualHost container for each virtual
> > host.
> >
> > Since as explained above, the whole point of virtual hosts is support
> > more than one site on an IP at same port, you didn't actually need a
> > separate IP for each site. The only time you might really need
> > multiple IPs on same box for web hosting is if you wanted to use the
> > box to host a different site, but have it be hosted using a different
> > web server instance. For example, people often use nginx or lighttpd
> > to host static media files. If not on a different box and want
> > everything to appear at port 80, you need multiple IPs. Each web
> > server would then only listen on IP address for that server. That is
> > rather than '80', would listen on 'A.B.C.D:80'.
> >
> > Anyway, ignoring multiple IPs and assuming only one, the VirtualHost
> > containers would then be:
> >
> > � <VirtualHost *:80>
> > � ServerName kennethdavid.net
> > � DocumentRoot /home/kdwadmin
> >
> > � ...
> > � </VirtualHost>
> >
> > � <VirtualHost *:80>
> > � ServerName carclubhub.com
> > � DocumentRoot /home/kdwadmin2
> >
> > � ...
> > � </VirtualHost>
> >
> > That sets up the virtual hosts, but not Django itself.
> >
> > For Django, since you want to mount Django at root of the virtual
> > host, ignoring issues of where Django code is located for now,
> > configuration would be:
> >
> > � <VirtualHost *:80>
> > � ServerName kennethdavid.net
> > � DocumentRoot /home/kdwadmin
> >
> > � <Location />
> > � � � � SetHandler python-program
> > � � � � PythonHandler django.core.handlers.modpython
> > � � � � SetEnv DJANGO_SETTINGS_MODULE mysite.settings
> > � � � � PythonDebug On
> > � � � � PythonPath "['/home/kwadmin', '/home/kwadmin/mysite] +
> > sys.path"
> > � � </Location>
> >
> > � � <Location /styles>
> > � � � � SetHandler None
> > � � </Location>
> >
> > � � <Location /images>
> > � � � � SetHandler None
> > � � </Location>
> >
> > � </VirtualHost>
> >
> > Note that no 'django.root' option is required for Django 1.0 if
> > mounted at '/'. That option is not relevant to older versions of
> > Django.
> >
> > Note that both parent of Django directory and the Django directory are
> > listed to reduce chances of problems if you didn't list 'mysite' in
> > module references in urls.py or elsewhere.
> >
> > The above assumes that the static file directories are under
> > DocumentRoot, thus:
> >
> > � /home/kwadmin/styles
> > � /home/kwadmin/images
> >
> > These should be physical copies of the directory/files and not a
> > symlink if Apache not configured for allowing following of symlinks
> > under directory associated with DocumentRoot.
> >
> > The other site would be similar:
> >
> > � <VirtualHost *:80>
> > � ServerName carclubhub.com
> > � DocumentRoot /home/kdwadmin2
> >
> > � <Location "/">
> > � � � � SetHandler python-program
> > � � � � PythonHandler django.core.handlers.modpython
> > � � � � SetEnv DJANGO_SETTINGS_MODULE mysite.settings
> > � � � � PythonDebug On
> > � � � � PythonPath "['/home/kwadmin2', '/home/kwadmin2/mysite] +
> > sys.path"
> > � � </Location>
> >
> > � � <Location "/styles">
> > � � � � SetHandler None
> > � � </Location>
> >
> > � � <Location "/images">
> > � � � � SetHandler None
> > � � </Location>
> >
> > � </VirtualHost>
> >
> > Only other thing to add is that because Apache runs as special user,
> > that user must be able to search directories and read files in those
> > directories. This applies to static files as well as code files making
> > up the Django site itself.
> >
> > Guess the question now is how does that compare with what you have.
> >
> > Secondly, with what should be correct configuration, what do you get
> > if you access:
> >
> > �http://kennethdavid.net
> >
> > and:
> >
> > �http://carclubhub.com
> >
> > Do you get a generic Apache HTTP error page with a simple test
> > message? If so, what does the message say?
> >
> > Alternatively, does it appear that Django is triggered? That is,
> > returning a working Django page, or an error page?
> >
> > If the correct content is returned, but styling is wrong and images
> > don't show, can you access style sheets and images using:
> >
> > �http://kennethdavid.net/images/....
> >
> > etc.
> >
> > Graham
> >
> > > On Jan 3, 10:21�pm, Graham Dumpleton <graham.dumple...@gmail.com>
> > > wrote:
> >
> > > > On Jan 4, 1:39�pm, garagefan <monkeygar...@gmail.com> wrote:
> >
> > > > > there is currently only one virtual host set up, for the site i'm
> > > > > working on. I do not need anything to happen with the other url.
> >
> > > > But why are you mentioning 'site2' in one of the other posts and
> > > > seeing for it what you only expect for 'site1'.
> >
> > > > > i simply need a virtual host forwww.website.netthatsitsat/home/
> > > > > site1/ on my server that has a django directory at /home/site1/mysite
> > > > > to work.
> >
> > > > Your initial configuration mentions /home/html in PythonPath. It is
> > > > very frustrating when people do not post exactly the Apache
> > > > configuration they are using and then try and describe in generic
> > > > terms using fake names and paths. It is okay if it is all consistent,
> > > > but your descriptions keep changing.
> >
> > > > > the django files themselves at �/mysite work just fine,
> >
> > > > Can you clarify when you are talking about a URL or a directory. If a
> > > > directory, specify full path.
> >
> > > > That you are mentioning '/mysite' here again is confusing because it
> > > > suggests a URL for a Django instance mounted at sub url of site, yet
> > > > you already seemed to have said you want to mount it at root of host,
> > > > ie., '/'.
> >
> > > > > and
> > > > > were working before i attempted to set up the virtual host. and
> > > > >www.website.netwasworkingjust fine as well with the way the
> > > > > <Location *>'s are currently set up, before the virtual host stuff was
> > > > > added.
> >
> > > > > i figure i'm missing something before the first <Location> that is
> > > > > causing the issue of the directory for the django apps not to be read.
> > > > > I do not want to set them up in the public_html directory as that is
> > > > > the main site directory, which if per chance i need to give someone
> > > > > access to that... i don't want them in the django directories at all.
> >
> > > > It is unclear here whether you are talking about static files, eg.
> > > > images and stylesheets, or Django code. You should never stick Django
> > > > directory containing code inside of a Apache DocumentRoot directory
> > > > for a host. Your better choices are to copy the static file
> > > > directories into DocumentRoot or use a symlink to link them in from a
> > > > different location. Depending on Apache configuration you may need to
> > > > set FollowSymLinks option. Alternatively, use an Alias directive in
> > > > Apache to effectively mount them at required URL from some other
> > > > directory location. Either way, mod_python is a PITA in that you need
> > > > to have SetHandler None for the URL (Location) context where they are
> > > > when whole Django site is mounted at a parent URL to the static files.
> >
> > > > > the server itself is a virtual server from godaddy running red hat 7
> > > > > w/ apache and mod_python.
> >
> > > > > I was looking at a few pages and they mention DocumentRoot... should
> > > > > this be to /home/site1 or to the project files?
> >
> > > > As I said above, you should never put Django code in DocumentRoot
> > > > because a mistake in Apache configuration can expose your source code
> > > > to download.
> >
> > > > > how does PythonInterpreter need to be applied?
> >
> > > > It doesn't if you are only hosting one Django site inside of a
> > > > VirtualHost.
> >
> > > > Now, did you get rid of PythonOption to django.root which I said is
> > > > not needed if mounting Django at root of site. Be aware though that
> > > > that is an option only relevant to Django 1.0. Are you actually using
> > > > Django 1.0? If you are using older version of Django, then you aren't
> > > > reading the correct version of
> >
> > ...
> >
> > read more �
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to