Find the answer to your Linux question:
Results 1 to 5 of 5
I just installed a centos server and am having issues understanding where to modify my apache config files so that I can access the web pages I have created. I'm ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    3

    Issue with Apache


    I just installed a centos server and am having issues understanding where to modify my apache config files so that I can access the web pages I have created.

    I'm still operating on my LAN.
    I can access the server via ssh on another computer on LAN

    I can access the page located at 192.168.X.X/test.php from the server itself (should be obvious). However, when I try to access the 192.168.x.x/test.php page from a web browser on my other computer on the LAN it says 'Cannot connect to server'. I can also ping from this other computer to the server fine.

    Would there be some setting in the httpd.conf file that I need to set that's by default set to deny from all from a fresh install? I do not see anything in the apache logs suggesting that the computer attempted to connect to the server
    Last edited by saxophonemaster; 05-19-2012 at 12:09 AM.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    your apache config files should be in /etc/httpd/conf/ and /etc/httpd/conf.d/, but that is probably not your problem.


    it is probably the firewall. try turning it off on the webserver pc:

    Code:
    service iptables stop
    if that is it, you can add a rule to allow it.

  3. #3
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    882
    Hello,
    On CentOS / Red Hat/ Scientific, iptables is on and enforcing a bunch of rules from the start.
    This article has some basic settings for CentOS web servers: Configuring CentOS 6 Web Server
    See Step 4 for iptables information. That whole article is actually quite useful for CentOS 6 (most things should apply to CentOS 5 as well)

  4. #4
    Just Joined!
    Join Date
    May 2011
    Location
    Malaysia
    Posts
    15
    Try to telnet to the destination server's port and you can be 100% sure that you're blocked by the iptables

  5. #5
    Linux Newbie
    Join Date
    Jan 2012
    Location
    Ohio
    Posts
    175
    yum install system-config-firewall-tui
    Then as root
    system-config-firewall-tui and open up HTTP
    Then make sure that your document root is set up properly.

Posting Permissions

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