Find the answer to your Linux question:
Results 1 to 7 of 7
Lately I've gotten reasonably interested in web design, and I've wanted to start my own server for some time. At the moment, I'm on my regular computer and I'm going ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jul 2005
    Posts
    122

    Apache server not working (yes i know this is vague, explanation in message)


    Lately I've gotten reasonably interested in web design, and I've wanted to start my own server for some time. At the moment, I'm on my regular computer and I'm going to use my ip address instead of a domain name. I know this is a security risk, but I'm planning to get a domain name, and make another older computer a server once I have it nicely configured on this computer. I decided to go with apache 1 after trying with no success to install apache 2 for an hour.

    Ok, so my server is configured, and I'm trying to access it in a browser.
    On my computer, I can access my website by typing localhost in the address bar. If I type in my ip address I get the following error (ip address changed):

    An error occurred while loading http://11.111.111.111:
    Timeout on server
    Connection was to 11.111.111.111 at port 80

    I'm assuming that I have the right ip of my computer, I got it from this website: http://whatismyip.co.uk/

    I put my httpd.conf (with ip address changed) on my old website, in case you want to look at it if you have an idea if some screw up there is causing this: http://mysite.verizon.net/vzep38ie/httpd(mod).txt

    Now, from what I can figure out, my server should be running, because it shows up if I type localhost on my computer, however I can't access it by typing in my ip address in the address bar on my browser.

    I believe that the following could be problems.

    1.) I may not actually know my ip address; the website that gave it to me might be wrong. (I doubt this about 4 other similar sites gave my the same answer) and I'm trying to access the wrong address.
    2.) My ISP, Verizon, is blocking outgoing messages for port 80. (I know that some ISP's block ports so you can't set up servers)
    3.) My httpd.conf file is somehow screwed up (I am a newb at this and I didn't change hardly any of the options, so this seems likely)

    Basically, I'm completely stuck because I don't know what's wrong with my server. I've tried researching all of the following likely problems, and have come up with nothing. I know this is a complicated and vague question, but I've documented my problem the best I can, and I hope that someone will take the time to answer it.
    -Brian
    There is no problem so complicated that you cannot find a very simple answer to it if you look at it in the right way

  2. #2
    Linux User yourname3232's Avatar
    Join Date
    Aug 2005
    Location
    Pacific Northwest, USA
    Posts
    262
    Post your httpd.conf and change the port number from 80 in httpd.conf since verizon blocks it. also try accessing the webserver with it's internal IP (if you have a LAN). And if you are on a LAN, make shure the ports are forwarded correctly in the router CP.
    Registered GNU/Linux User #399198
    'Experience is something you don't get until just after you need it.' -Steven Wright

  3. #3
    Linux Newbie
    Join Date
    Jul 2005
    Posts
    122
    On my httpd.conf I changed the outgoing port from 80 to 100, and this is how I set up port forwarding on my router.

    Private IP: 111.111.1.111 (IP Changed)
    Protocal Type: Both
    Private Port: 100
    Public Port: 80

    My website still doesn't show up. Also, I am on Verizon's fiber optic network, and the router plugs into a white box in my basement that connects to the net. Could this be a problem? This step doesn't make sense to me because it seems as if my website from my computer to my router is on port 100, and once it gets to my router, switches to port 80, and goes through the box in my basement to the net. I don't understand how Verizon wouldn't block my outgoing transmission since only on my LAN my site is on a port other than 80. Did I do this wrong?

    I'm assuming that my private ip is my internal ip. I found the private ip by running the command /sbin/ifconfig, and using the "inet addr". Could someone tell me if this is the correct way to find the ip?

    Thanks a lot yourname3232, I wouldn't of known what to fix without your message.

    -Brian
    There is no problem so complicated that you cannot find a very simple answer to it if you look at it in the right way

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Nov 2003
    Location
    Maryland
    Posts
    105
    You'll want the internal port on 80, and then 100 or whatever on the public side. Like yourname3232 said, Verizon blocks 80

  6. #5
    Just Joined!
    Join Date
    Apr 2005
    Posts
    88

    Apache Not Working

    Greetings

    To check the IP Address of the system execute the following command:
    /sbin/ifconfig. You will get the IP Address being assigned to your system.

    In order to check whether the apache is running your system or not you can execute the following commands:
    # ps -aux | grep httpd
    # service httpd status
    # telnet localhost 80

    Also, check on the router if the Port 80 has been forwarded to the IP Address on which the Apache server is running.

    Performing all the above steps will make sure that the apache is running and checking the port forwading on the router will forward all request coming on the Port 80 to the IP Address of yours.

    If still it it doesnt work then please check with the verizon support do they block port 80. If they do you need to configure the apache webserver on a different port and setup the port forwarding on the router and then check if everything works or not.

    Regards

  7. #6
    Linux Newbie
    Join Date
    Jul 2005
    Posts
    122
    I finally believe that I have apache and port forwarding configured correctly, however Apache doesn't seem to want to start.

    When I type "apachectl start"

    it says it starts,

    However when I type "apachectl stop"

    I get the following error: /usr/sbin/apachectl stop: httpd (no pid file) not running

    When I type my local IP, I get my website, but when I ran the following commands...

    # ps -aux | grep httpd
    # service httpd status
    # telnet localhost 80

    I get these errors...

    ps -aux | grep httpd
    Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
    www-data 9779 0.0 0.1 4168 1240 ? S 21:24 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
    root 11806 0.0 0.0 3704 580 pts/1 R+ 22:46 0:00 grep httpd
    root@1[fanfan1313]# service httpd status
    httpd: unrecognized service
    root@1[fanfan1313]# telnet localhost 80
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    Connection closed by foreign host.

    To me, it almost seems as if another web server is running...I did play around with lighttpd, but ending up uninstalling it. There isn't a possibility that it could still be running, is there?

    Thanks for all the help so far, I didn't even know what a private IP was until you guys helped me out....

    btw, is there any significant danger in posting my IP's, and will they help anyone solve my problem if I do post them?

    -Brian
    There is no problem so complicated that you cannot find a very simple answer to it if you look at it in the right way

  8. #7
    Just Joined!
    Join Date
    Apr 2005
    Posts
    88

    Apache Not Working

    Greetings,

    You dont need to dishartened as your apache is running that I can say for sure when you did a telnet on port 80 and it gone thru. The only problem now I think is the port at which it is running. You can change the apache default port to sum other port and then try to access the same with your public IP Address i.e you need to give the url as
    http://<Your Public IP Address>:<Port No.>

    As far these commands are concerned you may ignore them as they altogether depends on the falvour and version of Linux you are running.

    ps -aux | grep httpd
    service httpd status

    Also, did you had a word with the verizon support regarding the port blocking and if possible can you IM me your public IP Address so that I can check it from here and let you know if the server is running or not.

    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •