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.

we have more PCs in a network. There is an intranet application running on one of the se PCs under virtual server:

<VirtualHost 127.0.0.1>
   DocumentRoot "D:\data\o\application\root"
   ServerName application
</VirtualHost>

It is a Zend Framework application. That's why it requires virtual server. We are running Apache as a webserver on all PCs.

How can I access this application from another PC in the intranet if the PC has name, let's say "johndoe-pc"?

EDIT:

This is a complete virtual host configuration from httpd.conf:

NameVirtualHost 127.0.0.1

#D:\data\o is document roo of the Apache web server

<VirtualHost 127.0.0.1>
   DocumentRoot "D:\data\o"
   ServerName johndoe-pc
</VirtualHost>

<VirtualHost 127.0.0.1>
   DocumentRoot DocumentRoot "D:\data\o\application\root"
   ServerName application
</VirtualHost>

On the PC where the application is I can access it by typing:

http://application
share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

Replace 127.0.0.1 by *

<VirtualHost *>
   DocumentRoot "D:\data\o\application\root"
   ServerName application
</VirtualHost>

But depending of other part of your apache configuration it might not work, give it a try. Don't forget to restart Apache

share|improve this answer
    
What should I type in the URL address of the other PC's web browser to access the application? Also check my updated httpd.conf virtual server configuration. –  Richard Knop Aug 19 '10 at 6:39
1  
also, "application" must be known, to the PCs in the network, if you don't want to use the IP of that computer. You do this by either adding it to the hosts file, or you have a DNS server on your network, just like @esc1729 suggested. –  polemon Aug 19 '10 at 7:12
add comment

If you have no DNS server running you may access this virtual host directly via the IP of the server. I presume that the name you mentioned in your post is the NetBios name. You will need a DNS name. If you do not want to run a DNS server, just put name and IP of the webserver into all hosts files of your workstations. On Windows you'll find them in C:\WINDOWS\system32\drivers\etc\hosts.

share|improve this answer
add comment

If you don't want to change your Apache configuration, install an SSHd on that computer and use port forwarding with ssh -L80:serverip:80, where serverip is the IP of the computer running Apache.

You will then be able to access that application with http://localhost/.

I suggest however, that you change your Apache configuration, since with this solution, every user needs to open an SSH session to that computer.

share|improve this answer
add comment

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.