the localhost on apache server doesn't work!

Discussion in 'Web Development & Web Hosting' started by kobem, Sep 7, 2007.

  1. kobem

    kobem Megabyte Poster

    791
    1
    50
    hey people i just write here and have a big problem

    i downloaded php5 for windows also apache 2.2 for windows

    installed php5 then apache 2.2 then configured the apache 2.2.
    (httpd.conf) by embedding php5 module into this conf file

    after that apache server worked ! i mean i started
    but when i enter http://localhost on the browser
    it just tries to fill the bar but page doesn't open.

    WHY ? WHY CAN'T I OPEN LOCALHOST?
     
    Certifications: CCNA
  2. BosonMichael
    Honorary Member Highly Decorated Member Award 500 Likes Award

    BosonMichael Yottabyte Poster

    19,183
    500
    414
    [​IMG] :morebeer :popcorn

    What happens when you ping localhost?
     
    Certifications: CISSP, MCSE+I, MCSE: Security, MCSE: Messaging, MCDST, MCDBA, MCTS, OCP, CCNP, CCDP, CCNA Security, CCNA Voice, CNE, SCSA, Security+, Linux+, Server+, Network+, A+
    WIP: Just about everything!
  3. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    There is more to the conf file than just adding php.

    You need to set quite a few things. However, you don't say what you *have* set so it is somewhat hard to suggest what is missing.

    What does the log file show?

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  4. kobem

    kobem Megabyte Poster

    791
    1
    50
    i can ping localhost succesfully!

    but in browser nothing goes right!
     
    Certifications: CCNA
  5. kobem

    kobem Megabyte Poster

    791
    1
    50
    error log file is just ok ! no problem is available in there
     
    Certifications: CCNA
  6. csx

    csx Megabyte Poster

    511
    6
    81
    Certifications: A+, Network+, 70-271 & 70-272, CCENT, VCP5-DCV and CCNA
    WIP: Citrix
  7. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    Does it time out? Page cannot be displayed?
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs
  8. kobem

    kobem Megabyte Poster

    791
    1
    50
    no ! it just tries to fill the bar and stops when it came to half of the bar IN INTERNET EXPLORER

    it never opens IN FIREFOX

    AND I USE ZONE ALARM INTERNET SECURITY SUITE
     
    Certifications: CCNA
  9. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    Switch off ZA and try again. ZA *should* allow localhost, but I always try with this sort of thing switched off when there are problems.

    And you didn't answer my question as to what you configured in the httpd.conf.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  10. kobem

    kobem Megabyte Poster

    791
    1
    50
    I TELL ALL THINGS FROM BEGINNING

    i downloaded apache 5.2.4 windows binary from apache site
    then i downloaded php5 wndows binary from php.net site.

    after these

    i extracted php5 zip package into F:/php5

    also i created a folder for php files F:/www

    then i installed apache server

    it asked me three things

    i gave names : first localdomain second : test.localdomain
    third : this was the email

    and then i changed php5.ini-recomended to php.ini
    then went to configure apache server i mean
    httpd.conf file

    here is the httpd.conf file content

    View attachment This is the main Apache HTTP server configuration file.doc


    in this file i only changed directory and documentroot
    line paths to "F:/www"

    THATS ALL BUT LOCALHOST DOESN'T WORK
    ALSO NO ERROR MESSAGES ARE AVAILABLE
     
    Certifications: CCNA
  11. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    You've changed the docroot but there is no web site there yet, therefore you may well see nothing ! Theres nothing for the server to serve ! Sometimes in debug mode the server may show you a default test page, i'm not sure what apache does in this instance, its quite possible it does nothing.

    You need to configure a default page for the domain and put it in the docroot path somewhere.

    If you don't know what you're doing you should take it one step at a time and read as much as you can, then test all your assumptions, in this case test everythings working as you go along, not do five steps and complain when it breaks ! :D

    Daves little fable, at the risk of pi$$ing everyone one off, heres a story from my youth...

    I studied programming with this one guy at college, he wanted help with his assembler homework that didn't work, I told him to start small, get it working and then build on that. He said no, he already had 500 lines of broken assembler, it didn't work but he didn't want to lose it, so he just kept adding to it, learning nothing and ending up with a slightly larger non working program !

    Theres a debugging method called the 'American' debugging method, basically it states that if you can rewrite a faulty routine without bugs in less time than it takes to debug it that you should do it, now life's a little more complex than that, but its always worth considering...
     
  12. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    What you need right now is something you don't have to configure. The following link is to a one-click install for an entire working site with Apache, PHP, and MySQL. This is a product called XAMPP that is put out by a group called "Friends of Apache". Be aware that this will be a wide open server install. Nothing is locked down, so it is very hackable. You don't want to expose a site set up with this to the web until you learn about how to lock apache down, but this ought to get you up and running immediately.

    Just uninstall apache and php5 and download and install this package. It is fully configured to work by default.

    XAMPP
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1
  13. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
  14. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    LOL. I didn't see your post on that, or would have just recommended he take your advice rather than posting another link to it.
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1
  15. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    Sorry, it was CSX's post, I can't take the credit ! :biggrin
     
  16. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    :biggrin :biggrin
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.