[英].htaccess of getsimple gets me a 500 Internal Server Error on Ubuntu Localhost
localhost setup 本地主机设置
ubuntu 12.04 Ubuntu 12.04
mod rewrite enabled mod重写已启用
multiple sites running in different directory's 在不同目录中运行的多个站点
dir structure 目录结构
/var/www/mysite1/htdocs/
/var/www/filehostwatch.com/htdocs/
.
.
.
wordpress .htaccess that works in my getsimple dir(copyed for test reasons) without problems 可以在我的getsimple目录中工作的wordpress .htaccess(出于测试原因而复制)没有问题
the one from getsimple gives me a 500 The server encountered an internal error or misconfiguration ... i later figured out that this section is what caussing the error 来自getsimple的那个给了我500服务器遇到内部错误或配置错误...我后来发现这是造成错误的原因
.htacess .htacess
AddDefaultCharset UTF-8
now the section that causes errors 现在,导致错误的部分
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>
end of the section that causese 500 errors 导致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]
the config file in /etc/apache2/sites-enabled/ of the site looks like the one with another site where wordpress is running without problems. 该站点的/ etc / apache2 / sites-enabled /中的配置文件看起来与另一个运行wordpress的站点没有问题。 and as i said the htaccess from wordpress works even in this site when copied over.
正如我所说的,当被复制时,即使在此站点中,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>
Any idea what might cause this problem? 任何想法可能导致此问题吗?
You should probably change Satisfy All
to Satisfy Any
in the offending section to see if it helps. 您可能应该在有问题的部分中将“
Satisfy All
Satisfy Any
更改为“ Satisfy Any
Satisfy All
,以查看是否有帮助。
AddDefaultCharset UTF-8
Options All -Indexes
# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
Order deny,allow
Deny from all
</Files>
<Files sitemap.xml>
Satisfy Any
Order allow,deny
Allow from all
</Files>
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]
If I'm understanding your problem correctly... .htaccess
is in your /var/www/filehostwatch.com/htdocs/
directory? 如果我正确理解了您的问题...
.htaccess
在/var/www/filehostwatch.com/htdocs/
目录中? In which case I don't think you're giving enough permissions for your .htaccess
file to configure what you want... In your virtual host settings you have: 在这种情况下,我认为您没有为
.htaccess
文件提供足够的权限来配置所需的内容...在虚拟主机设置中,您具有:
<Directory /var/www/filehostwatch.com/htdocs/>
...
AllowOverride FileInfo
...
</Directory>
Which gives the ability to change mod_rewrite settings, but doesn't permit changing of host accesses (eg Allow
& Deny
) nor the changing of Options
. 这提供了更改mod_rewrite设置的功能,但不允许更改主机访问权限(例如
Allow
& Deny
)或Options
的更改。
Have you tried setting this to AllowOverride All
in your virtual host config? 您是否尝试过在虚拟主机配置中将此设置为
AllowOverride All
? Alternatively you could add more directive settings to the AllowOverride option. 或者,您可以将更多指令设置添加到AllowOverride选项。 Offhand I think
AllowOverride FileInfo Limit Options
should do the trick. 副手我认为
AllowOverride FileInfo Limit Options
应该可以解决问题。
See also Apache's doc on AllowOverride 另请参阅Apache的AllowOverride文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.