无法在新安装的 KDE Apache 上运行新安装的 wordpress

问题描述 投票:0回答:0

我经历了这个演练来安装wordpress并在新安装的KDE上运行。当我转到 localhost 时,我收到错误消息 - 无法访问此站点。在 Konsole 中,我运行 wpget localhost 并获得以下信息。

--2023-04-23 16:07:26--  http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://localhost/ [following]
--2023-04-23 16:07:26--  https://localhost/
Connecting to localhost (localhost)|::1|:443... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:443... failed: Connection refused.
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:443... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:443... failed: Connection refused.

在 other_vhosts_access.log 我有以下内容。

127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:08:51:27 -0400] "GET / HTTP/1.1" 301 280 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:09:25:25 -0400] "GET /wp-admin HTTP/1.1" 301 572 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:09:25:26 -0400] "GET /wp-admin/ HTTP/1.1" 500 3494 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:09:25:26 -0400] "GET /favicon.ico HTTP/1.1" 404 488 "http://localhost/wp-admin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:15:20:13 -0400] "GET /wp-admin/ HTTP/1.1" 302 364 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:15:20:14 -0400] "POST /wp-cron.php?doing_wp_cron=1682277614.0440680980682373046875 HTTP/1.1" 200 259 "-" "WordPress/6.2; https://localhost"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:15:23:00 -0400] "GET /wp-admin/ HTTP/1.1" 302 364 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:15:26:59 -0400] "GET / HTTP/1.1" 301 274 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:15:32:37 -0400] "POST /wp-cron.php?doing_wp_cron=1682278357.5827600955963134765625 HTTP/1.1" 200 259 "-" "WordPress/6.2; https://localhost"
127.0.1.1:80 ::1 - - [23/Apr/2023:15:32:37 -0400] "GET / HTTP/1.1" 301 274 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
127.0.1.1:80 ::1 - - [23/Apr/2023:15:33:29 -0400] "-" 408 0 "-" "-"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:15:36:43 -0400] "\x16\x03\x01\x02" 400 483 "-" "-"
127.0.1.1:80 ::1 - - [23/Apr/2023:15:37:47 -0400] "GET / HTTP/1.1" 500 2808 "-" "Wget/1.21.2"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:02:23 -0400] "GET / HTTP/1.1" 500 2808 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:02:49 -0400] "GET / HTTP/1.1" 500 2808 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:02:51 -0400] "GET / HTTP/1.1" 500 2808 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:03:02 -0400] "GET /wp-admin HTTP/1.1" 301 572 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:03:02 -0400] "GET /wp-admin/ HTTP/1.1" 500 3494 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:03:53 -0400] "-" 408 0 "-" "-"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:16:04:23 -0400] "POST /wp-cron.php?doing_wp_cron=1682280263.7927761077880859375000 HTTP/1.1" 200 259 "-" "WordPress/6.2; https://localhost"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:04:23 -0400] "GET /wp-admin/ HTTP/1.1" 302 364 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:04:38 -0400] "GET /wp-admin HTTP/1.1" 301 572 "-" "Wget/1.21.2"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:04:38 -0400] "GET /wp-admin/ HTTP/1.1" 302 363 "-" "Wget/1.21.2"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:05:14 -0400] "-" 408 0 "-" "-"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:06:07 -0400] "-" 408 0 "-" "-"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:07:25 -0400] "-" 408 0 "-" "-"
127.0.1.1:80 127.0.0.1 - - [23/Apr/2023:16:07:26 -0400] "POST /wp-cron.php?doing_wp_cron=1682280446.2133510112762451171875 HTTP/1.1" 200 259 "-" "WordPress/6.2; https://localhost"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:07:26 -0400] "GET / HTTP/1.1" 301 274 "-" "Wget/1.21.2"
127.0.1.1:80 ::1 - - [23/Apr/2023:16:08:25 -0400] "-" 408 0 "-" "-"

所以看起来某处设置了某种 301 重定向,但我不知道在哪里或如何解决它。我还认为日志中的第一个 POST 命令很有趣。不确定这是否正常。

POST /wp-cron.php?doing_wp_cron=1682277614.0440680980682373046875

更新:

不确定我做了什么,但现在当我运行 wget localhost 时,我得到以下信息。

--2023-04-23 17:43:00--  http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/wp-admin/install.php [following]
--2023-04-23 17:43:00--  http://localhost/wp-admin/install.php
Reusing existing connection to [localhost]:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
index.html: Permission denied

Cannot write to ‘index.html’ (Permission denied).

我不知道它为什么要尝试创建 index.html,而且我找不到一种方法来应用所需的任何权限来使其正常工作。我确实在 /srv/www/wordpress 目录中手动创建了一个 .htaccess 文件,然后在 wordpress 目录上运行了 chmod 755 。在我的 error.log 中,我有以下内容。

[Sun Apr 23 17:41:10.689136 2023] [core:crit] [pid 16671] (13)Permission denied: [client ::1:57636] AH00529: /srv/www/wordpress/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/srv/www/wordpress/' is executable
wordpress apache2
© www.soinside.com 2019 - 2024. All rights reserved.