Author Topic: Eeek. Refusal to access my web site under Apache.  (Read 3318 times)

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Eeek. Refusal to access my web site under Apache.
« on: 26 November 2002, 03:44 »
am on RedHat8.0

As Server name I put my Ip address

Listen to All addresses and in Port 80

Virtual Host Name I used both my ip and "Default Virtual Host"

Document Root Dir -->/var/www/html/ I also tried it as /var/www/html/index.html

Host Info --> Default Host

Directory Page search --> index.html and I also tried index.php

I went to firewall config and allowed port 80 to go through
Checked the permisions of the index file and its all in "read"

Clicked on httpd and it started.


Typed my ip in my browser and said Connection refused.
What is wrong?

Under RH 7.3 I had my server working in 10 minutes.
Yeah

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Eeek. Refusal to access my web site under Apache.
« Reply #1 on: 26 November 2002, 03:59 »
On my destkop that I use to do HTTP network installs I didn't have to configure anything. Just start httpd and it worked out of the box. But since you already started changing the defaults I assume you've been through this section?:

http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/ch-httpdconfig.html
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Eeek. Refusal to access my web site under Apache.
« Reply #2 on: 26 November 2002, 04:21 »
are you going through a proxy?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Eeek. Refusal to access my web site under Apache.
« Reply #3 on: 26 November 2002, 04:28 »
I am behind a router. But with RH7.3 it never gave me a problem.  
  I will put everything back to default and see what happens.
Yeah

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Eeek. Refusal to access my web site under Apache.
« Reply #4 on: 26 November 2002, 04:56 »
Nothing. Still same crap.  

VoidMan you didnt even put your Ip address in the configuration dialogue?
Yeah

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Eeek. Refusal to access my web site under Apache.
« Reply #5 on: 26 November 2002, 05:13 »
[edit]ITFM[/edit]

[ November 25, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Eeek. Refusal to access my web site under Apache.
« Reply #6 on: 26 November 2002, 05:14 »
quote:
Originally posted by bazoukas [The F*en Linux Militant]:
Nothing. Still same crap.  

VoidMan you didnt even put your Ip address in the configuration dialogue?



I take it back, I must have edited the httpd.conf file. I do it out of habit after a fresh install. The first thing I do is make httpd work. But I definitely did not use the graphical configuration tool. From what I can tell the only thing I changed in the httpd.conf file from default is the "ServerName" tag. Mine looks like this:

ServerName voidsmachine.voidsdomain.home:80

You have to be able to resolve the server from the client using the hostname you define here and if you use a name the server itself must know that the name is associated with it's ethernet interface (I have a DNS server with an entry for my RedHat 8.0 machine which resolves voidsmachine.voidsdomain.home to the eth0 IP address on that box).

Also make sure the server is up and running:

$ su -
# service httpd status

Make sure http sockets are in listen state:

# netstat -a | grep http

The above command on my machine returns:

Code: [Select]

Can the RedHat server ping outside of its local subnet?

Can you telnet to port 80?

# telnet xxx.xxx.xxx.xxx 80

type a few chars and press enter.

Also before doing *anything* check the /etc/httpd/logs/error_log file.
Someone please remove this account. Thanks...

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Eeek. Refusal to access my web site under Apache.
« Reply #7 on: 26 November 2002, 07:04 »
Believe it or not now that you talked about manual config,I find it more easy to use the actual files to config it. Thing is I just need to learn were such files are stored. GUI kinda sucks dick. Now I begin to  understand the handicaps of GUI. Anyway I got some questions.   I went on my laptop which i havent tweaked at all, so everything is set to default.

In the httpd.conf file

 On Listen it has only one ip adress. If i put 0.0.0.0 port 80 will be listening to all ips right?

 On the server name It has "ServerName new.host.name:80    Since i dont have a D-name I should put my IP addy right? This is like "branding" apache, like giving it a SS# (the ip).


  In the document root, var/www/html is where apache will look for the index.html file right? So in other words I should put my index.html in there. Am asking because I dont see the test page of apache in there, like in RedHat7.3.

 For a simple web site like mine, i dont need to play around with virtual host right?


   Thanks for just even reading this   :D

[ November 25, 2002: Message edited by: bazoukas [The F*en Linux Militant] ]

Yeah

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Eeek. Refusal to access my web site under Apache.
« Reply #8 on: 26 November 2002, 08:25 »
there should be a line somewhere that says "Port 80" and then you set it to listen on 0.0.0.0

i dunno about the servername because i got my own domain name for it.

you shouldnt need to play around with virtual hosts unless you plan to have more than one site.

you should have the Document Root set as "/var/www/html/" which is default. Apache will look for any index.html under any directory. THe index pages are defined in the httpd.conf: for example it will usually be set by default to first look for index.html then index.htm then index.php, index.cgi, index.pl, index.shtml, etc. and apache will look in that order for index files.
If there is no index file in the directory then by default apache will show a listing of everything within the directory, i turned off directory listing in my httpd.conf so that wouldnt happen.

[ November 25, 2002: Message edited by: The Master of Reality / B0B ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Eeek. Refusal to access my web site under Apache.
« Reply #9 on: 26 November 2002, 08:32 »
Never mind the html folder thing (last part of my question. It was s tupid question)

   For some reason with RedHat8 i decided to go all pro and shit, and I did configurations that are off the wall.

   I Just saw what I meesed up. Will fix it tomorow and post details for anybody who might find it helpfull.
Yeah

resiak

  • Newbie
  • *
  • Posts: 1
  • Kudos: 0
Eeek. Refusal to access my web site under Apache.
« Reply #10 on: 27 November 2002, 04:29 »
quote:
I am behind a router. But with RH7.3 it never gave me a problem.
I will put everything back to default and see what happens.  


You have to set you're router to map port 80 to you're comp.....

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Eeek. Refusal to access my web site under Apache.
« Reply #11 on: 27 November 2002, 04:51 »
You also have to understand that RedHat 8.0 comes with Apache 2.x. RedHat 7.3 came with Apache 1.3.x. The configuration files have changed significantly on the 2.x series.

The only thing you really should have to set is "ServerName" as I mentioned. If you read the comments in the config file right above that you will see:

Code: [Select]

As you can see by the comments this has to be a valid DNS name that resolves the address on your ethernet interface. You can use the IP address of your ethernet interface but then you must use the IP address when accessing your web server. In this example it is an Apache web server on my home network in which I have my own little DNS domain for (voidsdomain.home).

I have an entry "www.voidsdomain.home" in my DNS server that resolves the IP address of this server. When Apache starts it first tries to resolve the name www.voidsdomain.home and then binds the daemon to that address (You can also put this entry in your /etc/hosts on the server and on all clients). If you want this to be accessible to  machines out on the internet you will have to forward port 80 at your firewall to this server and set up an internet wide DNS entry. Then you need to set up a virtual host entry. In the virtual host entry you will have another "ServerName" entry matching the public DNS name. I do this on my external servers where I host many web sites on many domains.

Also, if you are already familiar with Apache 1.3.x and are new to Apache 2.x you should take a look at /usr/share/doc/httpd-2.0.40/migration.html. It's a highly recommended read.

[ November 26, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Eeek. Refusal to access my web site under Apache.
« Reply #12 on: 27 November 2002, 21:15 »
am saving all this. We should put this on the MES FAQ
Yeah

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Eeek. Refusal to access my web site under Apache.
« Reply #13 on: 27 November 2002, 10:08 »
Hey I just spent a couple hours creating a crappy Void Main site (so I have somewhere semi anonymous to stick image files etc): http://voidmain.kicks-ass.net/

Started with a fresh RedHat 8.0 install on an old crappy machine, setting up Apache 2.0 from playing in this thread and whipping up a couple of crappy pages and a guestbook.

Actually I set up 3 virtual hosts and am running 3 different sites off of it (those names won't get posted).  

[ November 27, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Eeek. Refusal to access my web site under Apache.
« Reply #14 on: 27 November 2002, 10:33 »
I just signed your guestbook. Prety damn fast man.

*note: VoidMan. I didnt know the link I entered was an actual web site. Am sorry dude.  :(
Yeah