You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andy Melton <am...@gservices-us.com> on 2003/05/08 22:27:30 UTC

[users@httpd] Change Document Root

I'm trying to get an application (RT from Bestpractical) to run on my
OpenBSD box.  I was having troulbe with the VirtualHost configuration,
so I tried to simply change the document root the the desired directory,
since this is the only site being served from this machine.  When using
the standard /var/www/htdocs directory, everything works fine.  By
making a few slight changes to httpd.conf, I can not access index.html
in the /opt/rt3/share/html.  I get the error '[error] [client
192.168.168.244] File does not exist: /opt/rt3/share/html/index.html'
when I try and access the page.

I've attached my entire httpd.conf.  Can you see any problems?  Here is
the directory listing of /opt/rt3/share/html:

bash-2.05b# cd /opt/rt3/share/html
bash-2.05b# ls -
ls: -: No such file or directory
bash-2.05b# ls -l
total 20
drwxrwxrwx  7 www  bin   512 Apr 15 08:54 Admin
drwxrwxrwx  3 www  bin   512 Apr 15 08:54 Approvals
drwxrwxrwx  2 www  bin  1536 Apr 15 08:54 Elements
drwxrwxrwx  3 www  bin   512 Apr 15 08:54 NoAuth
drwxrwxrwx  3 www  bin   512 Apr 15 08:54 REST
drwxrwxrwx  3 www  bin   512 Apr 15 08:54 Search
drwxrwxrwx  4 www  bin   512 Apr 15 08:54 SelfService
drwxrwxrwx  4 www  bin   512 Apr 15 08:54 Ticket
drwxrwxrwx  4 www  bin   512 Apr 15 08:54 User
-rwxrwxrwx  1 www  bin  4857 Apr 15 08:54 autohandler -rwxrwxrwx  1 www
bin  2757 Apr 15 08:54 index.html -rwxrwxrwx  1 www  bin  1114 Apr 15
08:54 l bash-2.05b# 

Does anything jump out?  I've been looking at this for hours and I'm
starting to see double...

Thanks.

-----Original Message-----
From: rt-users-admin@lists.fsck.com
[mailto:rt-users-admin@lists.fsck.com] On Behalf Of Adrian Chadd
Sent: Thursday, May 08, 2003 10:19 AM
To: shimi
Cc: amelton@gservices-us.com; rt-users@lists.fsck.com
Subject: Re: [rt-users] RT & Apache




.. imho, and not seeing the rest of your apache, if you point a browser
at rt.domain.com with rt.domain.com mapping to 192.168.168.51 it'll
work.

However, and apache can be quite black magic with this, if you point
your browser at 192.168.168.51 rather than rt.domain.com it doesn't have
enough information to determine the actual VirtualHost - so, depending
on how you have your apache setup it'l either;

* fall through to the default machine setup (ie, no virtualhost)
* fall through to some "default" virtual host, which I can't remember
  how or why at 1am.

(not having enough information actually means "Whats the Host:
header?"..)





Adrian

> > However, I am having trouble getting to the admin GUI.  I have added
> > an alias for the NIC:
> > 
> > 'ifconfig 192.168.168.51 alias'
> > 
> > This works, I can access the macine via ping or telnet through the
> > alias.  My /var/www/conf/httpd.conf virtual host directive looks 
> > like:
> > 
> > <VirtualHost 192.168.168.51>
> > 	ServerName rt.domain.com
> > 	DocumentRoot /opt/rt3/share/html
> > 	AddDefaultCharset UTF-8
> > 
> > 	PerlModule Apache::DBI
> > 	PerlRequire /opt/rt3/bin/webmux.pl
> > 
> > 	<Location />
> > 	SetHandler perl-script
> > 	PerlHandler RT::Mason
> > 	</Location>
> > </VirtualHost>
> > 
> > I compiled RT with --with-mysal --with-modperl1.  This is apache 1.3
> > 
> > Can you see where I might be making a mistake?  Why do I see my
> > default /var/www/htdocs/index.html when I point a browser to 
> > 192.168.168.51?  I even tried modifying my DocumentRoot of the main 
> > server to /opt/rt3/share/html since this is the only website on this

> > machine. When I did that, I got a 404 error...
> > 
> > 
> > 
> > _______________________________________________
> > rt-users mailing list
> > rt-users@lists.fsck.com
> > http://lists.fsck.com/mailman/listinfo/rt-users
> > 
> > Have you read the FAQ? The RT FAQ Manager lives at
> > http://fsck.com/rtfm
> > 
> 
> --
> 
>   Best regards,
>      Shimi
> 
> 
> ----
> 
>    "Outlook is a massive flaming horrid blatant security violation,
which
>     also happens to be a mail reader."
> 
>    "Sure UNIX is user friendly; it's just picky about who its friends
> are."
> 
> _______________________________________________
> rt-users mailing list
> rt-users@lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
> 
> Have you read the FAQ? The RT FAQ Manager lives at
> http://fsck.com/rtfm

-- 
Adrian Chadd			"It shouldn't take an hour and a half
for
<ad...@creative.net.au>	  "any woman to take a bath."
				    - Captain Jerk, Women and ..

_______________________________________________
rt-users mailing list
rt-users@lists.fsck.com http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm