我有一個Ubuntu服務器。我在那裏安裝了Apache,添加了我的文件,之後我沒有發現任何錯誤,只是無法連接到該地址。 (對於我的文件,我也必須啓用.htaccess)。我將在這裏添加.htaccess,但即使我刪除了.htaccess文件,該錯誤仍然存在。在ubuntu apache服務器上安裝我的文件後,它停止工作
RewriteEngine on
RewriteRule ^(\w+)$ index.php?page=$1 [L,NC,QSA]
RewriteRule ^(\w+)+\/$ index.php?page=$1 [L,NC,QSA]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule^http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
order allow,deny
allow from all
我也有一個vendor/autoload.php
有我不知道如果我要安裝的東西爲使其工作100%。
Apache的錯誤日誌
[Mon Apr 03 18:25:51.487006 2017] [rewrite:trace3] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] strip per-dir prefix: /var/www/ ->
[Mon Apr 03 18:25:51.487042 2017] [rewrite:trace3] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] applying pattern '^(\\w+)$' to uri ''
[Mon Apr 03 18:25:51.487047 2017] [rewrite:trace3] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] strip per-dir prefix: /var/www/ ->
[Mon Apr 03 18:25:51.487050 2017] [rewrite:trace3] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] applying pattern '^(\\w+)+\\/$' to uri ''
[Mon Apr 03 18:25:51.487053 2017] [rewrite:trace3] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] strip per-dir prefix: /var/www/ ->
[Mon Apr 03 18:25:51.487055 2017] [rewrite:trace3] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] applying pattern '^' to uri ''
[Mon Apr 03 18:25:51.487061 2017] [rewrite:trace4] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] RewriteCond: input='EXAMPLE.com' pattern='!^$' => matched
[Mon Apr 03 18:25:51.487065 2017] [rewrite:trace4] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] RewriteCond: input='EXAMPLE.com' pattern='!^www\\.' [NC] => matched
[Mon Apr 03 18:25:51.487069 2017] [rewrite:trace4] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] RewriteCond: input='offs' pattern='^on(s)|' => matched
[Mon Apr 03 18:25:51.487077 2017] [rewrite:trace2] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] rewrite '' -> 'http://www.EXAMPLE.com/'
[Mon Apr 03 18:25:51.487081 2017] [rewrite:trace2] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] explicitly forcing redirect with http://www.EXAMPLE.com/
[Mon Apr 03 18:25:51.487084 2017] [rewrite:trace1] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] escaping http://www.EXAMPLE.com/ for redirect
[Mon Apr 03 18:25:51.487090 2017] [rewrite:trace1] [pid 53934] mod_rewrite.c(468): [client 127.0.0.1:63842] 127.0.0.1 - - [EXAMPLE.com/sid#7fc536e48158][rid#7fc536d8e0a0/initial] [perdir /var/www/] redirect to http://www.EXAMPLE.com/ [REDIRECT/301]
包含您收到的錯誤消息很有幫助。 –
你看過阿帕奇的錯誤日誌嗎?它應該是'/ var/log/apache2/error.log' –
它沒有得到任何錯誤信息。只有我得到的是'這個網站無法到達'。 –