PDA

View Full Version : Apache is cranky.



deps
10-14-2003, 04:11 PM
Hello,

I have installed the latest knoppix to my hdd and is trying to set up apache.
I have apache installed, and as far as i know i dont have any firewall installed. (unless there was one installed automatically when i installed knoppix)

I have searched the forums but was unable to find any topic that matches my problem. And my problem is that i can connect to apache with 127.0.0.1 but not with my IP i got from my ISP. My friends cant connect to it either.
My ISP dont have a firewall on me either.

I have made sure that apache is listening to port 80. It does when i use 127.0.0.1 anyway.
I have been using Linux for a long time, but i am new to this networking stuff. I could really need some help.

I think the files host.allow and host.deny could have a part in this, but i dont know how to set them up properly. Here is how they look right now:

hosts.allow


ALL: 127.0.0.1 LOCAL : ALLOW
httpd: ALL


hosts.deny only contains comments

Is there something wrong with those? And is there any other files i have to edit to make apache listen to other IP's than the localhost?

And is there a firewall installed default, and how do i disable/edit it?


Thankfull for any help.

deps
10-14-2003, 06:32 PM
I think i am near the solution of the problem.
I installed firestarter so it could help me with the rules and stuff. And it looks like it works as it should.
And i think there is some problems with my network settings.
The thing is that i got 2 IP's from my ISP. One is between me and the ISP and the other is the public one.
When i run netcardconfig i enter the first one (starting with 10.xxxx) as the first IP and then i enter the other one as broadcast.
Is this the right way of doing it? I dont have DHCP or anything nice and easy like that.

I tried to swap the IP's and then i could access apache with my second IP, but then the rest of the internet was nowhere to find. :wink:

If i run nmap on 127.0.0.1 it tells me port 80 is open, but if i run nmap on my second IP it just says that the host is down.
And if i run nmap with -P0 it says that all ports was closed.

Got any ideas?

Sword-Fish
10-14-2003, 07:03 PM
I think you could try

http://xxx.xxx.xxx.xxx/

replace the x's with your ip

deps
10-14-2003, 09:39 PM
...But ofcourse that is what i have tried. :)
And all i get is "connection refused"
I can only access my site with http://127.0.0.1

I am sorry if i didn't make myself clear enough.

certifieduser
10-14-2003, 09:45 PM
delete both the files
/etc/hosts.allow
/etc/hosts.deny

i hope you havent modified apache config files. if you did go back to their original state if you made a backup of the config files.

i think this should work.

deps
10-14-2003, 10:10 PM
I renamed the hosts.* files, but it didnt help.
The only thing i changed in the apache file was ServerAdmin and ServerName.
But if i comment them out, like it was from the beginning, i still cant connect to apache with my external IP.
Only with 127.0.0.1

Sword-Fish
10-15-2003, 12:01 AM
Please could you send some details on your system.

operating system
isp (internet service provider)
ipconfig (results)
conection type (dial up, broadband etc)

ps
On a most operating systems, you should not have to modify any config files in order to get apache to startup correctly.It should run right out of the box.

noshankus
11-07-2003, 05:34 PM
Have you told Apache that it should have that IP address?

Do you have a dynamic address?? - Cos Apache by default assumes that it's IP address is 127.0.0.1

Check the httpd.conf file, normally it will say something about "assuming ServerName 127.0.0.1"

If you have a hostname, you can use:
ServerName dhcp19.wdf.intercomponentware.com

Else, I assume you will have to change it every time you dial-up =)

Hope thats got it...

aay
11-07-2003, 09:21 PM
Lot's of ISP's block port 80. They don't want people running web servers from their home machines. Do you know if your ISP is doing this? You might want to use nmap to scan your IP and see which ports are blocked.