|
Posted by Kim Andrι Akerψ on 11/24/06 16:06
Jersay Ballot wrote:
> http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_21986629.html
>
> I found the link but it doesn't seem to help at all.
> I'd like to use 2 directories as root ones at the same time. If this
> is possible please explain how, I am grateful.
This is actually more of an Apache configuration issue, and doesn't
have anything to do with PHP. However, your httpd.conf (or wherever the
virtual host configuration for your hostname(s) are in your Apache
configuration files) has to have something like this for your virtual
host:
<VirtualHost 192.168.0.1:80>
ServerName example.com
DocumentRoot /www/example.com
Alias /root /var/localhost/htdocs
<Directory /www/example.com>
Order allow, deny
Allow from all
AllowOverride All
</Directory>
<Directory /var/localhost/htdocs>
Order allow, deny
Allow from all
AllowOverride None
</Directory>
</VirtualHost>
Please note that this is just an example on how to do this. In the
above example, files for http://example.com/ are physically located in
/www/example.com, while files for http://example.com/root/ are located
in /var/localhost/htdocs on your server.
You can also do the same outside the <VirtualHost> block, but then the
Alias'ed directory will be available on all virtual hosts on that
server.
This can only be done inside the main Apache configuration (global) and
inside a <VirtualHost> block (local to a virtual host), and not from a
..htaccess file, ie. you will need access to the main Apache
configuration.
If you don't have access to the Apache configuration, the only option
left would be to set up a symbolic link if you have the FollowSymLinks
option set.
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|