Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 79808 - DirectoryIndex not functioning properly when using cgi-bin in ~/public_html
Summary: DirectoryIndex not functioning properly when using cgi-bin in ~/public_html
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Daniel Black (RETIRED)
URL: http://edge.scriptkitchen.com/~kitche...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-27 23:36 UTC by Jeremy Kitchen
Modified: 2005-02-02 00:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Kitchen 2005-01-27 23:36:47 UTC
I am installing a package that allows me to read windows help files via a web browser (specifically for the purpose of viewing the mIRC help file as well as the Jeepster's Numeric help file) into my public_html directory.

When I name the file index.cgi and put it into ~/public_html/cgi-bin/winhelp and browse to http://edge.scriptkitchen.com/~kitchen/cgi-bin/winhelp it simply hangs there.. the file is never accessed by apache, and eventually my browser times out.

However, if I use the full path, for instance ... http://edge.scriptkitchen.com/~kitchen/cgi-bin/winhelp/index.cgi it pulls up fine.

I'm using a stock Gentoo apache build and config file.

[ebuild   R   ] net-www/apache-2.0.52-r1  +berkdb -debug -doc +gdbm +ipv6 +ldap +ssl -static -threads 0 kB


Reproducible: Always
Steps to Reproduce:
1. create ~/public_html/cgi-bin/testcgi
2. cp /var/www/localhost/cgi-bin/test-cgi ~/public_html/cgi-bin/testcgi/index.cgi
3. point your_favorite_browser_038 at http://localhost/~youruser/cgi-bin/testcgi
4. See that step 3 ends up timing out.
5. point the aforementioned browser at http://localhost/~youruser/cgi-bin/testcgi/index.cgi
6.  See that step 5 works properly.

Actual Results:  
step 3 timed out.. step 5 worked properly

Expected Results:  
step 3 should have returned exactly what step 5 did

emerge info is especially useful in this case, but I will provide it anyways.

kitchen@edge ~/public_html/cgi-bin/testcgi $ emerge info
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.4,
glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r13 i686)
=================================================================
System uname: 2.6.9-gentoo-r13 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Dec 31 2004, 13:08:08)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 apache2 apm arts avi berkdb bitmap-fonts crypt encode f77 font-server
foomaticdb fortran gdbm gif imagemagick imlib ipv6 jpeg ldap libg++ libwww mad
mikmod motif mpeg mysql ncurses nls nptl nptlonly oggvorbis opengl oss pam
pdflib perl png python quicktime readline samba sasl sdl spell ssl svga tcpd
tiff truetype truetype-fonts type1-fonts vda xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS, PORTDIR_OVERLAY


I have a feeling this is a bug in apache, but it might be a bug in the config
file... I don't know enough about apache to be able to put my finger on the
problem, but I'm sure it has to do with line 233 of commonapache2.conf

if this needs to be reported upstream, let me know and I will do so :)

Thanks for the great OS.
Comment 1 Jeremy Kitchen 2005-01-27 23:37:35 UTC
err *cough* emerge info *ISN'T* especially useful :)
Comment 2 Daniel Black (RETIRED) gentoo-dev 2005-01-31 22:05:10 UTC
emerge info is useful for other bugs where it is the system configuration that is causing the problem. In this cause as a user/applicable error it is not particularly useful.

Look around line 845 of commonapache2.conf and there is a section on home directories.

Look in the apache log files /var/log/apache2 for more meaningful errors.
Comment 3 Jeremy Kitchen 2005-02-01 10:15:55 UTC
well, I figured out why it was timing out.. and that was just that I was accessing the system via http://192.168.1.7/ and/or http://edge/ and apache was redirecting me to http://edge.scriptkitchen.com/ which was pointing me at the outside IP of my network, which obviously won't work :)

fixing that (with some dns trickery... <3 tinydns) now when I go to:
http://edge.scriptkitchen.com/~kitchen/cgi-bin/winhelp (with or without a trailing /) I don't properly get shown index.cgi .. i just get a 403 forbidden (this is probably what you saw from the outside)

I'll look at this a little more later and see if I can't figure out how to make it work.
Comment 4 Daniel Black (RETIRED) gentoo-dev 2005-02-02 00:08:29 UTC
forbidden can either be file permision problem (public read and execute normally required) or the apache config is not set up.

Any problems refer to the apache doco (as you've probably read numberous times) or see the apache web site on where to obtain further info.