Ubuntu 16.04 中的 Lamp 和 .htaccess 文件 - 不起作用

Ubuntu 16.04 中的 Lamp 和 .htaccess 文件 - 不起作用

我根据本教程在 Ubuntu 16.04 LAMP 上安装了:如何在 Ubuntu 16.04 上使用 LAMP 安装 WordPress

当我在此 LAMP 上仅安装 Wordpress 时,一切正常。但是当我在 Wordpress 上复制页面时,Apache 返回错误 500:

内部服务器错误

服务器遇到内部错误或配置错误,无法完成您的请求。

请联系服务器管理员 webmaster@localhost,告知他们此错误发生的时间,以及您在出现此错误之前执行的操作。

有关此错误的更多信息可以在服务器错误日志中找到。

Apache/2.4.18 (Ubuntu) 服务器位于 192.168.10.120 端口 80

我认为这可能是文件的问题.htaccess

# Apache config 
<FilesMatch ".(eot|ttf|otf|woff)">   
    Header set Access-Control-Allow-Origin "*" 
</FilesMatch>

# 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] 
</IfModule>

# END WordPress
# php_value max_execution_time 300

因为在全新安装中Wordpress.htaccess是空的,然后一切正常。我是否必须安装其他东西才能使页面正常工作?

这是error.log来自var/log/apach2/error.log

[Mon Mar 27 09:08:47.663417 2017] [mpm_prefork:notice] [pid 15538]
AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal ope$
[Mon Mar 27 09:08:47.663501 2017] [core:notice] [pid 15538] AH00094:
Command line: '/usr/sbin/apache2' [Mon Mar 27 09:16:04.982425 2017]
[core:alert] [pid 16677] [client 192.168.10.46:53100]
/var/www/html/kopiapbs/.htaccess: Invalid co$ [Mon Mar 27
09:22:29.850458 2017] [core:alert] [pid 16459] [client
192.168.10.46:53184] /var/www/html/kopiapbs/.htaccess: Invalid co$ [Mon Mar 27 09:23:04.754081 2017] [core:alert] [pid 16459] [client
192.168.10.46:53200] /var/www/html/kopiapbs/.htaccess: Invalid co$ [Mon Mar 27 09:23:15.646759 2017] [core:alert] [pid 16458] [client
192.168.10.46:53205] /var/www/html/kopiapbs/.htaccess: Invalid co$ [Mon Mar 27 09:26:03.453740 2017] [core:alert] [pid 16661] [client
192.168.10.120:60456] /var/www/html/kopiapbs/.htaccess: Invalid c$ [Mon Mar 27 09:26:06.668605 2017] [core:alert] [pid 16662] [client
192.168.10.120:60458] /var/www/html/kopiapbs/.htaccess: Invalid c$ [Mon Mar 27 09:26:07.253867 2017] [core:alert] [pid 16660] [client
192.168.10.120:60460] /var/www/html/kopiapbs/.htaccess: Invalid c$ [Mon Mar 27 09:26:07.731521 2017] [core:alert] [pid 16679] [client
192.168.10.120:60462] /var/www/html/kopiapbs/.htaccess: Invalid c$ [Mon Mar 27 09:26:08.221063 2017] [core:alert] [pid 16457] [client
192.168.10.120:60464] /var/www/html/kopiapbs/.htaccess: Invalid c$ [Mon Mar 27 09:26:08.689843 2017] [core:alert] [pid 16680] [client
192.168.10.120:60466] /var/www/html/kopiapbs/.htaccess: Invalid c$ [Mon Mar 27 09:26:09.100912 2017] [core:alert] [pid 16677] [client
192.168.10.120:60468] /var/www/html/kopiapbs/.htaccess: Invalid c$ [Mon Mar 27 09:26:13.998190 2017] [core:alert] [pid 17860] [client
192.168.10.120:60470] /var/www/html/kopiapbs/.htaccess: Invalid c$

相关内容