在配置我的 apache 虚拟主机以与 mod_rewrite 一起工作时遇到问题。我一直在启用 mod_rewrite a2enmod rewrite
,我正在为我的虚拟主机创建 conf 文件
ServerName wpa.myserver.com
ServerAdmin webmaster@localhost
DocumentRoot "/var/www/wordpress"
<Directory "/var/www/wordpress">
AllowOverride All
Options +FollowSymLinks
Order allow,deny
allow from all
</Directory>
在 apache 重新加载时,我收到错误 500,在我的日志文件中,我收到以下内容
Invalid command 'Rewrite', perhaps misspelled or defined by a module not included...
htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Rewrite test.html index.html
</IfModule>
# END WordPress
PS。以前我试图使用 webmin 来配置我的虚拟主机