Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-25-2012, 04:09 AM #1
- Join Date
- Sep 2012
- Thanked 0 Times in 0 Posts
Unable to connect. 'localhost' issue.
Not sure if this is normal, though while searching the web I don't find anything, but I'm having difficulty getting the index page I created to test my apache installation to come up when I type in 'localhost'. When I do, it tells me that it doesn't exist or can't be found. Here are the steps I took to install apache:
1. Downloaded latest apache build for windows via apachelounge.com.
2. Extracted .zip file into its own directory named 'apache'.
3. Edited httpd.conf to reflect the locations of all the parts that need direct path locations. I couldn't use port 80, so I chose 8079 instead. Works fine.
4. Created a 'www' dir separate from the 'apache' dir for the index.html file for localhost to be pointed to.
5. Used admin cmd prompt to install httpd.exe (Apache HTTP server), then ran it. Both times, it gave me the error of the server name not being defined, but could be globally set. So, I went into the hosts file to uncomment the second to last line which contained '127.0.0.1 localhost'.
5. Typed 'localhost' into browser and it told me that it was unable to connect and that the address can't be found. I tried 127.0.0.1 and the same event occurred.
Not sure what I'm doing wrong, but I would like to solve this issue soon. Any input as to why this occurs? Thanks.
09-25-2012, 06:38 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,650 Times in 2,619 Posts
Is the status of the Httpd service running? If there is an error, the service will be listed as stopped.
Also, you must type in http://127.0.0.1:8079 when attaching to this if you didn't use the port of 80. You can modify C:\windows\system32\drivers\etc\services to add the custom port. I don't know why you didn't just use port 80 though; if its unavailable its best to find out what is listening on it (netstat -ab would work, search through it to find the port 80 listening application) and disable it if its not required. 80 should be reserved for web service software such as apache and IIS.
Sounds like you may still have issues with the conf, so make sure that its set the servername.