2

I have checked several tutorials on the web and answers here, none seem to be working for me. I am unable to set up my local web server so my projects are available via name other than http://localhost/projectname

Here is my httpd-vhosts.conf

<VirtualHost 127.0.0.2:80>
    ServerAdmin me@me.me
    ServerName tweet
    DocumentRoot "D:\xampp\htdocs\tweet"
    ErrorLog logs/tweet-error_log
    CustomLog logs/tweet-access_log common
    <Directory "D:\xampp\htdocs\tweet">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride None
        Order Allow,Deny
        Allow From All
    </Directory>
</VirtualHost>

And here is my hosts:

127.0.0.1       tweet
127.0.0.1       localhost
::1             localhost

2 Answers2

0

Have you considered changing the IP of that vhost to 127.0.0.1:80 or just adding to the hosts file this line: 127.0.0.2 tweet

And one more thing, don't forget to restart your server.

Adam Benayoun
  • 1,138
  • 2
  • 14
  • 26
0

That should work, although, do be aware that only YOU will be able to access it by that name. If you want other people to be able to access it by that name you will need to register a domain with some registrar.

Although, why are you binding it to 127.0.0.2? And is Apache listening on 127.0.0.2?

Natalie Adams
  • 745
  • 1
  • 6
  • 16
  • Why was this down voted? The OP never stated wither he wanted other people to access it by a name, and those 2 questions are legitimate questions as the OP didn't post more about his situation. – Natalie Adams Aug 14 '10 at 23:11
  • Seriously, whoever voted this down, remove the downvote... this answer was spot on. I copied and pasted from a stack overflow answer which was on the exact same subject. I saw 127..... and I didn't look at the rest of the address. I'm up and running now, thanks! – Chris Sobolewski Aug 14 '10 at 23:20