正如标题所示,我试图使用Postgresql在WAMP上运行多个本地开发站点.我尝试了这么多的组合,但都没有工作。
我有三个网站,对应于现场制作网站,所以干净的网址是关键.
我在我的硬盘驱动器c:\CM\Web\fooproject上的本地文件夹中安装了Drupal7
我在WAMP中创建了一个在c:\wamp\www\fooproject到c:\CM\Web\fooproject的硬链接
我在\site目录中编辑了"sites.php“,如下所示:
$sites['localhost.site1.example.com'] = 'site1.example.com';
$sites['localhost.site2.example.com'] = 'site2.example.com';
$sites['localhost.site3.example.com'] = 'site3.example.com';我在本地PC主机文件中添加了以下内容:
127.0.0.1 localhost.site1.example.com
127.0.0.1 localhost.site2.example.com
127.0.0.1 localhost.site3.example.com我连接到浏览器中的站点,例如- for site1:
"http://localhost/site1.example.com"我在PostgreSQL中创建了一个名为"site1drupal“的数据库
我在WAMP中启用了重写模块
Alias /site1.example.com "c:/wamp/www/fooproject/"
<Directory "c:/wamp/www/fooproject/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>我在drupal目录c:/wamp/www/fooproject/中编辑了".htaccess“文件,以重写基本目录如下:
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /fooproject我在WAMP > http.conf上编辑了这个http.conf文件,以包含虚拟主机目录:
<VirtualHost *:80>
ServerAdmin site1@dummy-host.example.com
DocumentRoot "c:/wamp/www/fooproject/"
ServerName site1.example.com
ServerAlias localhost.site1.example.com
ErrorLog "c:/wamp/logs/site1-error.log"
CustomLog "c:/wamp/logs/site1-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin site2@dummy-host.example.com
DocumentRoot "c:/wamp/www/fooproject/"
ServerName site2.example.com
ServerAlias localhost.site2.example.com
ErrorLog "c:/wamp/logs/site2-error.log"
CustomLog "c:/wamp/logs/site2-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin site1@dummy-host.example.com
DocumentRoot "c:/wamp/www/fooproject/"
ServerName site1.example.com
ServerAlias localhost.site1.example.com
ErrorLog "c:/wamp/logs/site1-error.log"
CustomLog "c:/wamp/logs/site1-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin site3@dummy-host.example.com
DocumentRoot "c:/wamp/www/fooproject/"
ServerName site3.example.com
ServerAlias localhost.site3.example.com
ErrorLog "c:/wamp/logs/site3-error.log"
CustomLog "c:/wamp/logs/site3-access.log" common
</VirtualHost>我复制了站点目录中的“默认”文件夹,并创建了3个名为"site1.example.com“、"site2.example.com”和"site3.example.com“的新文件夹。
我能够很好地安装站点,导航到localhost/site1.example.com/?q=admin/config/search/clean-urls并启用干净的urls。
但结果是,如果我单击主页外的链接,就会看到“内部服务器错误”页面:(
错误日志显示如下:
[Thu Feb 13 17:56:14.108803 2014] [core:error] [pid 5268:tid 1636] [client 127.0.0.1:57100] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://localhost/site1.example.com/
[Thu Feb 13 17:56:14.109805 2014] [core:debug] [pid 5268:tid 1636] core.c(3518): [client 127.0.0.1:57100] AH00122: redirected from r->uri = /site1.example.com/admin/config, referer: http://localhost/site1.example.com/我确信这是一个简单的修复,但我只是看不到它..too许多移动的部分。如能提供任何帮助,将不胜感激:
发布于 2014-02-16 21:57:05
好吧我想出来了..。
1)我需要删除我使用WAMP创建的别名,因为只有在我安装了多个drupal (比如测试不同版本) ..have与多个站点无关的情况下,它们才是好的!
2)使用实际站点名为每个站点设置Vhost.例如:
3)编辑sites.php文件以链接您在web浏览器中放置的内容(localhost.site1.mwdworks.com => site1.mwdworks.com)。
4)在您的计算机主机文件中添加您将放在web浏览器中的站点名(出于本地开发的目的--只要它与您在sites.php中的内容相匹配,它就可以是任意名称.)例如:
127.0.0.1 localhost.site1.example.com
中提琴...this所有的工作都很好,...just遵循下面的说明,你很好)
https://stackoverflow.com/questions/21767406
复制相似问题