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
Replace
127.0.0.1
by*
But depending of other part of your apache configuration it might not work, give it a try. Don't forget to restart Apache
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.
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
, whereserverip
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.