Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question

2 Answers 2

up vote 0 down vote accepted

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?

share|improve this answer
    
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. –  Nathan 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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.