Connecting to Apache

Discussion in 'Apache' started by pgmm, Jan 29, 2010.

  1. #1
    I have compiled Apache from source and it runs with no error messages.
    From the browser it delivers the correct index file using either /local/host/domain name or the IP but I can not connect or ping from another computer.
    From this I imagine that Apache is functioning OK and there is some problem with permissions that review of the documentation and various other sites has failed to solve.
    I have edited only httpd.conf and restarted after each edit.
    The file is set as follows.

    ServerRoot "/usr/local/apache"
    Listen 80
    NameVirtualHost 192.168.1.24:80
    User daemon
    Group daemon
    ServerAdmin murrellpeter91@yahoo.com
    ServerName 192.168.1.24:80
    DocumentRoot "/usr/local/apache/htdocs"
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all

    </Directory>
    <Directory "/usr/local/apache/htdocs">
    Options Indexes FollowSymLinks
    Options All
    Options Multiviews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    <IfModule dir_module>
    DirectoryIndex index.html
    </IfModule>
    <FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
    </FilesMatch>

    Then accept all defaults in the current distribution until.

    <VirtualHost 192.168.1.24:80>
    UseCanonicalName off
    ServerName www.schoolrun.net
    ServerAlias www.schoolrun.net
    DocumentRoot "/usr/local/apache/htdocs/schoolrun.net/"

    #Other directives etc....
    </VirtualHost>

    So to confirm, I have not edited any other file and I am now desperate for some guidance from somebody that knows what they are doing. Anybody?
    Thanks for reading and regards for the weekend
     
    pgmm, Jan 29, 2010 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    1.
    you did NOT specify your OS or distribution if Linux
    without that it may be hard to give precise detailed help

    if linux and a decent dist, then there always is a running properly configured version in packages

    2.
    in linux
    you definitely would check if apache actually RUNNING
    the fact that apache is installed means in no ways that apache is running!

    because in your "browser" examples apparently you refer to file-browser and NOT to http:// protocol

    3.
    when all public folders installed as admin ( root) make sure you properly adjust ownership of all public folders/files
    for example in a typical opensuse environment that would mean:

    chown -R wwwrun:www /usr/local/apache/htdocs/*

    4.
    the missing ping however rather suggests that you simply have apache down and need to start it first
    make sure your system is configured to automatically start apache on system boot

    also do a configuration check - typical dist have one or 2 scripts to check validity of apache configuration files
     
    hans, Feb 3, 2010 IP
  3. pgmm

    pgmm Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi Hans and thanks.
    I am a complete beginner but Apache was running.
    I do have a problem with configuration. I do now understand the difference between static and dynamic IP addresses (yes I know this is a beginners problem - please excuse - and I have been playing around with the programmes that update dynamic DNS addresses to the DNS server (or at least investigating) and port forwarding
    I have entered the router IP into the DNS reference and entering the website address brings up the router so I suppose that is one step forward, at least the internet can find my house.

    I am supposing that I need to forward from the router port to an apache port but it appears that port 80 and 8080 are not accessible - presumably blocked by the ISP and I am investigating which other prots can be used for http.

    So to sum up, I am still struggling/playing and if you have any further advice to offer I will be so, so grateful to hear from you.
    Thanks again and best regards
    Peter
     
    pgmm, Feb 9, 2010 IP
  4. justin@nextknowledge.com

    justin@nextknowledge.com Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I agree with Hans, if you are new to Apache you should take as many variables as possible and look at using a Red Hat or Debian based Linux distro. Use either Yum or Apt to get Apache up and running with as little configuration as possible, so you can see how a basic system is set up.

    If you are using a RH distro make sure IPTables isn't blocking all traffic. Also make sure apache is "LISTENING" to all incoming requests and not "bound" to something like 127.0.0.1 (your loop back).

    If all else fails I find it easiest to do TCP packet captures and analyze the packets using something like WireShark.

    ** if linux run tcpdump on your apache server from the cli

    If you see TCP packets from your client IP to your Server IP and back and forth followed by some HTTP packets then it probably would be wise to start looking through the log files for Apache to see if it's throwing some errors there that could help you identify the problem more clearly.