I have made a virtual host on a machine and reloaded apache, but I can't seems to be able to access it from another computer on the same network. (It does work when I set the ip of the server and in the host file of the other machine)

to make the virtualhost I have edited /etc/httpd/conf/httpd.conf and added:

<VirtualHost 192.168.0.1:80>
    DocumentRoot /home/sites/mysite
    ServerName mysite.test.corp
    ErrorLog logs/mysite.test.corp-error_log
    CustomLog logs/mysite.test.corp-access_log common
    <Directory /home/sites/mysite>
        AllowOverride All
    </Directory>
</VirtualHost>
link|improve this question

50% accept rate
feedback

1 Answer

up vote 1 down vote accepted

If it works when you set the IP in your hosts file, then there is a DNS problem somewhere on the local network. Did you create the record "mysite.test.corp." on your local authoratative DNS servers?

link|improve this answer
To add to that: I have a router that forwards port 80 to my public web server; I publish the external IP address of the router in my external DNS. My router can't handle internal traffic attempting to access the external address (it doesn't port forward correctly). So I had to set up internal DNS to mirror (but lie about) the external DNS. – Roger Lipscombe Oct 7 '09 at 14:38
feedback

Your Answer

 
or
required, but never shown

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