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

I've setup a virtualhost in my pc using "wamp server". The virtual host is accessible via http://myproject-name.lan/

Now, how shall we reach it via the other lan client pc? And also, how can we reach the other virtual hosts?

I don't know enough about http.conf. But this is my current setting for it, for my vhosts.

<Directory "D:/WAMP/myproject/">
     Options Indexes FollowSymLinks
     AllowOverride all
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
</Directory>
share|improve this question
    
I'll do some reading, following your posted links. –  Gary Lising Aug 27 '12 at 18:25
    
Got it solved. I don't care for the down vote. –  Gary Lising Aug 27 '12 at 19:46

3 Answers 3

up vote 3 down vote accepted

Now, how can I reach it via one of my other lan client pc?

Your virtual host can be accessible only from localhost (Allow from 127.0.0.1). Change it to your subnet, for e.g:

<Directory "D:/WAMP/myproject/">
     Options Indexes FollowSymLinks
     AllowOverride all
     Order Deny,Allow
     Deny from all
     Allow from 192.168.1.0/24
</Directory>

And also, how can I reach the other virtual host?

List all virtual hosts first:

# apachectl -S

then access via server name.

share|improve this answer
    
Thanks. You answered first ahead of lain. So I accepted your answer. But Both of your answer helped me out. Editing my hosts file got it solved, plus your answers. –  Gary Lising Aug 27 '12 at 19:44

Your configuration is only allowing connections from 127.0.0.1. You'll need to allow from the lan too

Allow from 127.0.0.1 192.168.0.1/24

should do it assuming that your lan address is in the 192.168.0.1/24 network.

or if there is just a small number of addresses you want to allow access

Allow from 127.0.0.1 192.168.0.11 192.168.0.21

Access Control Documentation

share|improve this answer
    
thanks for the link, but I've got it all covered. What solved my question is the windows hosts file. but of course your answer is still helpful. –  Gary Lising Aug 27 '12 at 19:42
    
@GaryDapogi: Can you post an answer explaining why/how the windows hosts file solved your problem - you can then accept that as the answer ? –  Iain Aug 27 '12 at 19:45
    
@lain: Alright, Applying what you both guys answered, plus adding the machine's ip address (where wamp server is installed from) to all the hosts file of my lan client pc's. It was not working before I add that up. –  Gary Lising Aug 27 '12 at 19:50

in order to answer your question correctly you need to provide us with an actual error message, but from what I see a lot of folks suggested "Allow from" to be defined properly so that other computers on your network can access it, but I think you need go through Apache Virtual Host documentation - Apache HTTP Server and set it up properly.

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.