Forum Moderators: phranque

Message Too Old, No Replies

installing apache 2.0.52 on win xp

help with setting correct servername and domain

         

dot_74

6:16 am on Sep 16, 2005 (gmt 0)

10+ Year Member



I am probably asking a very silly question but here goes:
I just bought this book PHP, MySQL, and Apache all in one. I installed MySQL fine, it works. I installed Apache and it got my servername and domain from my network configuration, but I cannot connect to it. So I uninstalled Apache and tried setting the servername to "localhost" and the domain to "localdomain" in the install gui. I still cannot connect to it. I have been installing/uninstalling it over and over again. What am I doing wrong? I just want to be the only person using apache on my computer, not the whole www.

coopster

2:31 pm on Sep 16, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, dot_74.

Have you tried keying in "localhost" in your browser's address bar from the machine that is running Apache?

dot_74

3:48 pm on Sep 16, 2005 (gmt 0)

10+ Year Member



Yes, the page that displays is one that says Apache is installed but that the websites configuration has changed. Then I try to hit my php page and I get a 404, in the error log it says that file does not exist. The wierd thing is that when I look at the url before trying the php test, it no longer says "http://localhost" it says "file://c:/programfiles/my documents/bleh bleh" and in the log file for the php page it has a different directory. I retype "http://localhost/phpinfo.php" and that's when I get the 404.
I admin apache on linux for my job, been doing it for years, this is why I don't really like windows but this is all I have at home. I just want to learn how to do php on my own machine. So what do I put in exactly for my servername and domain?

pnllan

8:48 pm on Sep 16, 2005 (gmt 0)

10+ Year Member



In your HTTPD.CONF do you have the following directives?

ServerName localhost:80

DocumentRoot "D:/work"

On Windows, ALL file paths MUST BE quoted and you CANNOT use the standard windows backslash, you must use the foreslash.

dot_74

9:01 pm on Sep 16, 2005 (gmt 0)

10+ Year Member



here is what I have in my httpd.conf:

ServerName localhost:80
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

This is the url I get re-directed to.....
file:///c:/DOCUME~1/RJM/LOCALS~1/TEMP/awjzn08a-1

This is what that page says:
If you can see this, it means that the installation of the Apache web server software on this system was
successful. You may now add content to this directory and replace this page.

Seeing this instead of the website you expected?

This page is here because the site administrator has changed the configuration of this web server.
Please contact the person responsible for maintaining this server with questions. The Apache Software
Foundation, which wrote the web server software this site administrator is using, has nothing to do with
maintaining this site and cannot help resolve configuration issues.

The Apache documentation has been included with this distribution.

You are free to use the image below on an Apache-powered web server. Thanks for using Apache!

Someone mentioned the fact that I use a D-Link Ethernet BroadBand Router that it might not be passing along the "localhost" request properly, or how I want it to....

pnllan

4:58 am on Sep 17, 2005 (gmt 0)

10+ Year Member



Is the PHPINFO.PHP file that you mentioned earlier in the folder "C:/Program Files/Apache Group/Apache2/htdocs"?

The folder, "C:/Program Files/Apache Group/Apache2/htdocs", is the default folder used by the installation for your DocumentRoot. This means that you need to do one of TWO things:

1) Place your HTML, PHP, and whatever other web files you intend on serving in the folder - "C:/Program Files/Apache Group/Apache2/htdocs"

or

2) Changed your DocumentRoot to whatever folder contains the web files you intend to server.

I have had Browser Cache not detect changes made to pages, not that this is necessarily your problem. So, I frequently clear my Temporary Internet Files when I am making a large number of changes and during initial configuration of my servers. I even close and clear my browser in certain case.

I doubt the Router is the problem here, unless you have made some radical configuration changes to it.

~

dot_74

4:44 am on Sep 18, 2005 (gmt 0)

10+ Year Member



Ok, I am not even trying to php page anymore, as I cannot even bring up the index.html under C:\Program Files\Apache Group\Apache2\htdocs. That is what my DocumentRoot is set to, using the / instead of the \ and with quotes. When I try to hit the localhost, I get a URL redirect to this:
file:///c:/DOCUME~1/RJM/LOCALS~1/TEMP/2panakw2-1
and the page displayed is the same as above, when going to [localhost...] i get a 404. this is not making sense.

pnllan

8:00 am on Sep 18, 2005 (gmt 0)

10+ Year Member



Considering the "file:///c:/DOCUME~1/RJM/LOCALS~1/TEMP/2panakw2-1" issue, it sounds like the INSTALL app has something goobered up.

I suggest uninstalling Apache 2.0.52 (Stop the Service FIRST), deleting any residuals, rebooting, and then installing with the latest Apache (2.0.54). During the install, use "localhost" for the Network Domain and the Server Name.

dot_74

9:12 am on Sep 18, 2005 (gmt 0)

10+ Year Member



I will give this a shot as I am still not making any progress.....so just to make sure, I put in the spot where it asks for domain: localhost and the same for server name?

pnllan

3:22 pm on Sep 18, 2005 (gmt 0)

10+ Year Member



Yes...

For the environment that you are trying to setup, this is what I normally do and have been successful.

~