logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Can't access localhost but can access 127.0.0.1 from browser
Author
davidmanvell



Joined: 09 Jun 2009
Posts: 6

PostPosted: Tue 09 Jun '09 7:25    Post subject: Can't access localhost but can access 127.0.0.1 from browser Reply with quote

I installed Apache 2.2.11 on Windows Vista x64 by itself.

I could not however get any web broswer to access http://localhost but it will access http://127.0.0.1

Not sure what I did wrong, I uninstalled it and deleted all the files to it then I installed Wampserver (which installs and set up apache, php and mysql in one shot).

Same thing. I can open a web browser and access 127.0.0.1 but not http://localhost

Any ideas?

There is no errors in error.log or access.log that i can see. I made no changes to the httpd.conf file.

I will try to post the file here but not sure if it will take due to the length of the file.


Last edited by davidmanvell on Tue 09 Jun '09 7:33; edited 1 time in total
Back to top
davidmanvell



Joined: 09 Jun 2009
Posts: 6

PostPosted: Tue 09 Jun '09 7:31    Post subject: Reply with quote

Here is my conf file with comments removed:

ServerRoot "c:/wamp/bin/apache/apache2.2.11"

Listen 80

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule php5_module "c:/wamp/bin/php/php5.2.9-2/php5apache2_2.dll"

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User daemon
Group daemon

</IfModule>
</IfModule>

ServerAdmin admin@localhost

ServerName localhost:80

DocumentRoot "c:/wamp/www/"

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>


<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks

AllowOverride all


Order Deny,Allow
Allow from all
Allow from 127.0.0.1

</Directory>

<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

ErrorLog "c:/wamp/logs/apache_error.log"

LogLevel warn

<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog "c:/wamp/logs/access.log" common

</IfModule>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "cgi-bin/"

</IfModule>

<IfModule cgid_module>
</IfModule>

<Directory "cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

</IfModule>

Include conf/extra/httpd-autoindex.conf

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

Include "c:/wamp/alias/*"
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 09 Jun '09 7:39    Post subject: Reply with quote

c:\windows\system32\drivers\etc\hosts <-- no file extension

add

127.0.0.1 localhost
Back to top
davidmanvell



Joined: 09 Jun 2009
Posts: 6

PostPosted: Tue 09 Jun '09 16:41    Post subject: Reply with quote

That did it thank you.
Back to top


Reply to topic   Topic: Can't access localhost but can access 127.0.0.1 from browser View previous topic :: View next topic
Post new topic   Forum Index -> Apache