Hello!
Using Linux or Apache, if the web root is at d:\web, how to add virtual directory like IIS, e.g. add d:\share as a virtual directory.
How to add virtual directory
Moderator: General Moderators
Re: How to add virtual directory
I think what you're looking for is Alias.
Code: Select all
Alias /share D:\share
<Directory D:\share>
Order allow,deny
Allow from all
</Directory>Re: How to add virtual directory
Hello!
This is not php format, right?
This is not php format, right?
Re: How to add virtual directory
Right. It's better to let Apache do it than PHP.
Re: How to add virtual directory
Hello!
Tried to add virtual directory into the section of Aliases, but without functioning. Any body can help? Thanks!
Server: Buffalo LinkStation
1. edited httpd.conf at /etc/apache
2. Add virtual directory at the section of <IfModule mod_alias.c>
Alias /share "/mnt/disk1/Share"
<Directory "/mnt/disk1/Share">
Options None
AllowOverride All
Order allow,deny
Allow from all
</Directory>
3. then performed apache restart
4. try to open http://192.168.0.100:81/share/test.htm
it's 404 - Not Found
Tried to add virtual directory into the section of Aliases, but without functioning. Any body can help? Thanks!
Server: Buffalo LinkStation
1. edited httpd.conf at /etc/apache
2. Add virtual directory at the section of <IfModule mod_alias.c>
Alias /share "/mnt/disk1/Share"
<Directory "/mnt/disk1/Share">
Options None
AllowOverride All
Order allow,deny
Allow from all
</Directory>
3. then performed apache restart
4. try to open http://192.168.0.100:81/share/test.htm
it's 404 - Not Found
Re: How to add virtual directory
It looks right. What if you have Options +Indexes and go to just /share?