0

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

3 Answers 3

1

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

2
  • 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. Aug 19, 2010 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, 2010 at 7:12
1

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.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .