Link to home
Start Free TrialLog in
Avatar of cybersoftt
cybersoftt

asked on

Apache virtual directory creation in LAN using System Name

Hi,
In My Lan Network,
The System Names are PHP-Server,PHP-client1,,PHP-client2 etc...
I installed LAMP  in PHP-server system.
I wan to create Virtual directory in all my clients sytems.
How to i mention that client systems  virtual directory in my PHP-server  apache configuration file?
Avatar of Joe Wu
Joe Wu
Flag of Australia image

As an example something like this:

 NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain
</VirtualHost>

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>


More information here:

http://httpd.apache.org/docs/2.0/vhosts/name-based.html
Avatar of cybersoftt
cybersoftt

ASKER

can u tell
what is the difference virtualhost and virtual directory?
i wan to create virtual directory for same server name and port in different machines.
sorry i misread your post for wanting virtual host.

Here are a few links for your reference which may help you in creating your virtual directory:

http://www.golivein24.com/tips/dynamic_content/03_apache_alias.html
http://rudyegenias.wordpress.com/2006/09/14/apache-2-virtual-directory-the-xampp-approach/
http://download.oracle.com/docs/html/A85247_01/ap_web.htm
I tested in wamp server multiple virtual directory is not working
the code is
This is default.
<Directory "D:/wamp/www">
    Options Indexes FollowSymLinks
   AllowOverride all
    Order Allow,Deny
    Allow from all
</Directory>
I added one more directory

<Directory "E:/test123">
    Options Indexes FollowSymLinks
   AllowOverride all
    Order Allow,Deny
    Allow from all
</Directory>
I can able to acess first virtual directory.
If i tried http://localhost/test123/
I am getting following msg.
The requested URL /test123/ was not found on this server.


ASKER CERTIFIED SOLUTION
Avatar of Joe Wu
Joe Wu
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Alias name is problem .Now i added alias name it's working now.
Thank You
Glad to be of assistance :)