Problems Connecting to Apache Server (Suspect problem with my IP setup)

Posted on 2003-03-13
Medium Priority
Last Modified: 2010-03-18
Here is my setup: Running VMWare, have a RedHat 7.1 (2.4.2) installation running, server mode, just recently downloaded apache and installed it and such.  I am pretty new to the linux enviro, but I think apache is all set up correctly.  I can view the test page by using 'lynx localhost'.  I set up eth0 for a static IP, the configuration file will be pasted below.  It is set up like this because my firewall is portforwarding to this static IP, I dont know if it would have worked before I messed with the IP configuration, I didnt try it.


I read something about inetd I think it is?  The daemon that handles all the connections and such.  I tried looking to see if the conf file was where this tutorial said it was, but it didnt exist at all...

I can ping the address, I get a response, but strangely enough I can't telnet to port 80, or 8080 on the address.
Also, anybody know how I can get apache to autostart everytime the server restarts?  I'm sure there must be some sort of script somewhere.

Thanks for any help... Jim
Question by:halcyon985
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8135285

inetd was now replaced by xinetd (extended inetd). By default the telnet, ftp and all xinetd based serices are disbled in RHL 7.1 (7.1 to 8.0). you want to enable it by editing the file "/etc/xinetd.d/telnet". Follow the following steps,

   1. open /etc/xined.d/telnet file with any editor
   2. change "disable=yes" to "disable=no" in that file
   3. save the file
   4. restart the xinetd service by the command "service xinetd restart"
   5. Now the telnet is enabled and you can easily telnet in to your machine (dont specify port number to run telnet).

To start apache whil booting
  1. run the command "ntsysv"
  2. its a text based tool, check in the "http" option.
  3. click -OK-
  4. restart your computer

its will be OKAY...


Expert Comment

ID: 8135290

There is no problem in your IP Configuration


Accepted Solution

pholdy earned 800 total points
ID: 8136654
I don't think halcyon wanted to enable the telnet daemon, but he was testing to see if apache was able to accept a connection (other than from localhost).

You don't want to enable telnet, its very insecure.  SSH should've been installed by default, and is probably already running.

about getting services to start at boot.  This seems to be confusing for most new users, personally I don't think ntsysv is not a usefull tool at all.  To the best of my knowledge, you can not ADD a service with the tool, you can only manage services that are already configured.

To do this you need init.d script. It that contains the proper commands to start and stop your service. I think there is a basic start/stop script in the apache docs.(if not, email me, i'll send you one).  

You use a program called "chkconfig" to add, remove, and control the services that start during boot, etc.

in order for chkconfig to work, you need two or more commented lines added to the begining of the script. The first line tells chkconfig what runlevels the service should be started in by default, as well as the start  and stop priority levels. If the service should not, by default, be started in any runlevels, a - should be used in place of the runlevels list.  The second line contains a description for the service, and may be extended across multiple lines with backslash continuation.

       For example, random.init has these three lines:
       # chkconfig: 2345 20 80
       # description: Saves and restores system entropy \
       #           pool for higher quality random number g
This  says that the random script should be started in levels 2, 3, 4, and 5, that its start priority should be 20, and that its stop priority should be 80.  You should be able to figure out what the description says; the \ causes the line to be continued.  The extra space in front of the line is ignored.

taken from chkconfig man files. type "man chkconfig" for more info.  I've never had a problem getting app's to start/stop at boot time using the method above..

I think the reason you can't connect to apache is because your running iptables, or ipchains, and port 80 is NOT allowed.  if your on 7.1, your most likely running ipchains. to temporaraly disable ipchains type "/etc/init.d/ipchains off"

goto whereever you installed apache and start it.. usually "/usr/local/apache/bin/apachectl start"

you should now be able to telnet to port 80, and also connect via browser to your machine via IP address.

if you can't apache isn't configured correctly.

Author Comment

ID: 8144104
<temporaraly disable ipchains type "/etc/init.d/ipchains off" >

This was exactly it, the command was stop, not off... but its all good, it told me my mess up when I typed it.  I appreciate all your help, and thanks for answering the question thoroughly... it helped a lot!!



Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question