本地主机设置
Ubuntu 12.04
mod重写启用
在不同目录中运行的多个站点
目录结构
/var/www/mysite1/htdocs/
/var/www/filehostwatch.com/htdocs/
.
.
.
wordpress .htaccess 在我的getsimple dir中工作(出于测试原因复制)没有问题
getsimple 的那个给了我一个 500 服务器遇到内部错误或配置错误...我后来发现这部分是导致错误的原因
.htacess
AddDefaultCharset UTF-8
现在导致错误的部分
Options -Indexes
# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
Order allow,deny
Deny from all
Satisfy All
</Files>
<Files sitemap.xml>
Order allow,deny
Allow from all
Satisfy All
</Files>
导致 500 错误的部分的结尾
RewriteEngine on
# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
该站点的 /etc/apache2/sites-enabled/ 中的配置文件看起来像另一个站点的配置文件,其中 wordpress 运行没有问题。正如我所说,来自 wordpress 的 htaccess 在复制时甚至可以在这个站点中工作。
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName filehostwatch.localhost
DocumentRoot /var/www/filehostwatch.com/htdocs
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/filehostwatch.com/htdocs/>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
知道什么可能导致这个问题吗?