You are here: Re: 2 documentroots set up possible « PHP Programming Language « IT news, forums, messages
Re: 2 documentroots set up possible

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]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация