Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Whose fault is it
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Thu Jan 01, 2004 6:38 am    Post subject: Whose fault is it Reply with quote

when friends try to view my web site, links to http://ipaddress/subdirectory fail, but links to http://ipaddress/subdirectory/index.php work

Whose fault is this, apache or the web browser, and if it's apache's fault, how do I fix this?

I'm using Apache 2
_________________
BitWise Chat
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 743
Location: Inside

PostPosted: Thu Jan 01, 2004 6:45 am    Post subject: Reply with quote

They both seem to work for me. But why are you advertising free cars? :D
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Thu Jan 01, 2004 6:48 am    Post subject: Reply with quote

haha, those were just filler words, not actual links! I didn't know that they would resolve at all!
_________________
BitWise Chat
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 743
Location: Inside

PostPosted: Thu Jan 01, 2004 7:05 am    Post subject: Reply with quote

It works for me if I use index.php.en instead of just index.php. I looked for a while a couple of months ago trying to find where that was set in the configs but failed. Ah well. Learning Apache is on my List of Things To Do next year (still '03 here).
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Thu Jan 01, 2004 7:08 am    Post subject: Reply with quote

When the time comes, Happy New Year
By the way, 2004 is much different than 2003!
_________________
BitWise Chat
Back to top
View user's profile Send private message
jtp755
l33t
l33t


Joined: 01 Sep 2003
Posts: 691
Location: USA

PostPosted: Thu Jan 01, 2004 7:09 am    Post subject: Reply with quote

also have a look at the DirectoryIndex line in your apache2.conf file.
_________________
www.EternalFireProof.com
Registered Linux User #334610
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 743
Location: Inside

PostPosted: Thu Jan 01, 2004 7:20 am    Post subject: Reply with quote

jtp755 wrote:
also have a look at the DirectoryIndex line in your apache2.conf file.

I don't have a DirectoryIndex line in my apache2.conf you insensitive clod!

No, really. I don't have one. No line containing Directory or Index and only one irrelevant instance of directory. This is 2.0.48. What should it contain?
Back to top
View user's profile Send private message
elzbal
Guru
Guru


Joined: 31 Aug 2002
Posts: 364
Location: Seattle, WA, USA

PostPosted: Thu Jan 01, 2004 9:17 am    Post subject: Reply with quote

Are you sure you don't have a DirectoryIndex line? One appears (or should appear) in the file by default. If it is not there, I might be a bit worried that something else may be wrong. Do a search for "index.html" to see if you can find it.

The DirectoryIndex directive specifies a "default document" that will be served if a directory is requested. By default, the line should look like:
Code:
DirectoryIndex index.html

Change it to the following (or add the following) and all will be well:
Code:
DirectoryIndex index.html index.php


More info can be found at http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex
(The same command exists for both Apache 1.3 and 2.0.)
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Thu Jan 01, 2004 9:45 am    Post subject: Reply with quote

The DirectoryIndex directive is in commonapache2.conf for a standard Gentoo emerge of Apache2. The default install settings are fine, and shouldn't be causing this problem.

Have you started Apache with "-D PHP4"? See /etc/conf.d/apache2 to set/check this.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Thu Jan 01, 2004 2:45 pm    Post subject: Reply with quote

Code:
DirectoryIndex index.html index.html.var index.php index.php3 index.shtml index.cgi index.pl index.htm Default.htm default.htm
So it looks like DirectoryIndex is not my problem. If so, what is?
_________________
BitWise Chat
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Thu Jan 01, 2004 10:23 pm    Post subject: Reply with quote

Did you check for "-D PHP4"?

Is this the default Apache site or have you set up your own vhost? If so, what is the configuration?

Does "http://ipaddress/subdirectory/" (note trailing slash) work?

Have you disabled mod_dir (responsible for rewriting "http://ipaddress/subdirectory" to "http://ipaddress/subdirectory/")?

When the "http://ipaddress/subdirectory" fails what is the error message, or do you get a directory listing?
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Thu Jan 01, 2004 10:33 pm    Post subject: Reply with quote

I have -D PHP4 enabled (without it, php wouldn't be working)
I don't know what a vhost is, so I think it's the default Apache site.
I can't tell you right now if a trailing slash makes a difference because the problem isn't with my system, it's with others who view my web page, whether they use Mozilla or IE. Everything, even no trailing slash, works on localhost, where the web site is being served from.
I didn't manually disable mod_dir, but where would that setting be so I can make sure?
_________________
BitWise Chat
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Thu Jan 01, 2004 10:34 pm    Post subject: Reply with quote

Think I found where it was, in /etc/apache2/conf/apache2.conf
Code:
LoadModule dir_module                    modules/mod_dir.so

So it doesn't look like it's being disabled
_________________
BitWise Chat
Back to top
View user's profile Send private message
Telamon
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2003
Posts: 129

PostPosted: Fri Jan 02, 2004 12:47 am    Post subject: Possibly different settings for localhost/other IP's Reply with quote

Check your apache2.conf file and see if you have a line

Code:
Include conf/vhosts/Vhosts.conf


If it's commented out (# at the start of the line), you should be fine (Apache2 will use the global configs for anyone who connects) but if it's not commented out, you might have some settings in /etc/apache2/conf/vhosts/vhosts.conf that are changing your config for people coming in under a different hostname or port. Post the output of

Code:
grep -v ^# /etc/apache2/conf/vhosts/vhosts.conf


if there is any, and maybe we can figure it out from there. Real example URLS might help too (just setup a test dir if you don't want people looking at the real site.)
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Fri Jan 02, 2004 1:04 am    Post subject: Reply with quote

Thanks for the reply
Code:
dave@neo dave $ grep -v ^# /etc/apache2/conf/vhosts/vhosts.conf
(No output)

Every line in the file is commented out
however, in my apache2.conf:
Code:
Include conf/vhosts/vhosts.conf

Is it possible this line that includes a blank file is affecting my webserver's function?
This is the default "emerge apache" configuration
_________________
BitWise Chat
Back to top
View user's profile Send private message
Telamon
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2003
Posts: 129

PostPosted: Fri Jan 02, 2004 3:17 am    Post subject: Not the vhosts... Reply with quote

Hmm, nope, if the file is blank including it doesn't trigger anything bad. Are you behind any sort of NAT box / firewall? Also, from your local machine, does it work if you use your public IP address (ie, http://123.45.67.89/dir/ instead of http://locahost/dir/)?


BTW: When someone goes to http://ipaddress/subdirectory what error do you get in error_log?
Code:
tail /etc/apache2/logs/error_log
might give us something to go on.
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Fri Jan 02, 2004 3:22 am    Post subject: Reply with quote

Telamon:
I'm not behind any FireWall (that I know of), also, on my box, 123.45.67.89/dir does work.
I'll let you know about the error log when I get my tester online :-)
_________________
BitWise Chat
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Fri Jan 02, 2004 3:23 am    Post subject: Reply with quote

http://droberts.homelinux.org:8008/teacher
By the way, by all means look at the real site! There's not much at all there!

I may be turning the computer on and off, but otherwise it's usually on and serving
_________________
BitWise Chat
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Fri Jan 02, 2004 4:03 am    Post subject: Reply with quote

Looks like somebody else [client 66.157.73.48] was able to log into my site :-)
Anyone want to stand up ;-)

In other news, the log did not reveal any errors when my other friend tried going to the address with no trailing slash
_________________
BitWise Chat
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Fri Jan 02, 2004 5:25 am    Post subject: Reply with quote

Is the PHP web-app directory in the default document root i.e. /var/www/localhost/htdocs ?

Is there a .htaccess file in /var/www/localhost/htdocs?
Is there a .htaccess file in /var/www/localhost/htdocs/subdirectory?
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
Mallrats
Guru
Guru


Joined: 15 Jul 2002
Posts: 414
Location: Cleveland Ohio

PostPosted: Fri Jan 02, 2004 5:37 am    Post subject: Reply with quote

I don't know what a PHP web app directory is, and I'm pretty sure I don't have one in my DocumentRoot (no directory I can see)

There is not a .htaccess file in either directory
_________________
BitWise Chat
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Fri Jan 02, 2004 5:48 am    Post subject: Reply with quote

The directory containing your PHP application is the one I was referring to.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Fri Jan 02, 2004 5:59 am    Post subject: Reply with quote

http://droberts.homelinux.org:8008/teacher/ works.
http://droberts.homelinux.org:8008/teacher/index.php works.

http://droberts.homelinux.org:8008/teacher gives me an error box indicating refusal when trying to contact 127.0.0.1:8008. Doesn't look like the server is able to work out its name for the redirecton. Set the ServerName parameter (/etc/apache2/conf/apache2.conf) to your fully qualified domain name.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 743
Location: Inside

PostPosted: Fri Jan 02, 2004 6:59 am    Post subject: Reply with quote

I've been watching this thread interestedly as I have the same issue and the same default setup. As I posted above it works if I change index.php to index.php.en. Does this have to do with the language settings in commonapache2.conf?
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Fri Jan 02, 2004 8:39 am    Post subject: Reply with quote

I don't think Mallrats' problem is related to language settings. Mallrats' index.php is functioning if directly addressed.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum