Drupal符号链接到Drupal之外的另一个目录
我在/home/Drupal中有一个多站点的Drupal设置 我希望路径指向我的服务器/home/iphone上Drupal之外的目录 以下是vhost文件中的条目:Drupal符号链接到Drupal之外的另一个目录,drupal,apache2,directory,symlink,Drupal,Apache2,Directory,Symlink,我在/home/Drupal中有一个多站点的Drupal设置 我希望路径指向我的服务器/home/iphone上Drupal之外的目录 以下是vhost文件中的条目: <VirtualHost 192.168.100.244:80> ServerAdmin serveradmin@mysite.com DocumentRoot /home/drupal ServerName mysit
<VirtualHost 192.168.100.244:80>
ServerAdmin serveradmin@mysite.com
DocumentRoot /home/drupal
ServerName mysite.com
ServerAlias mysite.com www.mysite.com www.mysite.com mysite.com
ErrorLog /var/log/httpd/mysite5_err_log
CustomLog /var/log/httpd/mysite5_log special
<Directory /home/drupal>
Options FollowSymLinks +Includes ExecCGI
AllowOverride All
DirectoryIndex index.html index.htm index.php
</Directory>
</VirtualHost>
服务器管理员serveradmin@mysite.com
DocumentRoot/home/drupal
服务器名mysite.com
ServerAlias mysite.com www.mysite.com www.mysite.com mysite.com
ErrorLog/var/log/httpd/mysite5\u err\u log
CustomLog/var/log/httpd/mysite5\u特殊日志
选项如下SymLinks+包括Execgi
允许超越所有
DirectoryIndex.html index.htm index.php
这是通过符号链接完成的,还是在vhost文件或Apache设置中完成的?
如何做到这一点
谢谢您需要:
- 符号链接(使用apache选项FollowSymLinks)
- 或别名:
<VirtualHost 192.168.100.245:80>
ServerAdmin serveradmin@bbgi.com
DocumentRoot /home/drupal
ServerName mysite.com
ServerAlias www.mysite.com mysite.com
Alias /iphone/ /home/iphone/
ErrorLog /var/log/httpd-www1/www2/be_err_log
CustomLog /var/log/httpd-www1/www2/be_log special
<Directory /home/drupal>
Options FollowSymLinks +Includes ExecCGI
AllowOverride All
DirectoryIndex index.html index.htm index.php
</Directory>
</VirtualHost>
如果在指向/home/iphone时需要服务器上所有网站的别名 您需要编辑/etc/httpd/conf/httpd.conf文件并添加以下行:
AliasMatch ^/iphone/(.*) /home/iphone/$1
你能给我一个例子,我会写的每个选项请。它是:DocumentRoot/home/iphoneservername mysite.com/iphonego/home/drupal并创建一个符号链接:“ln-s../iphone-iphone”可以工作,但是我如何为各个站点创建它呢。这是为我的Drupal站点/iphone创建一个sym链接。如果我只是为了mysite.com而不是为了myothersite.com需要它怎么办?我有/home/drupal/sites/mysite.com/home/drupal/sites/myothersite.com等等……有人知道如何做到这一点吗?我需要能够将Drupal网站目录设置为指向服务器上的另一个目录。您可以使用apache mod_rewrite在域上使用RewriteCond和iphone的RewriteRule来完成此操作,请查看apache文档
AliasMatch ^/iphone/(.*) /home/iphone/$1