有人可以帮忙吗?
我在Ubuntu 16.04上安装了最新的apache2和wordpress。我的问题是我无法在wordpress中创建新页面,然后在我的浏览器中访问它,例如example.net/newpage我只得到404,我检查了我的固定链接设置并且它们设置正确。 Wordpress说页面已经创建了,我可以在wordpress界面中编辑它没有任何问题,如果它只是保存为草稿,我也可以查看它,一发布我得到404.
我的wordpress虚拟主机设置:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName example.net
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/html/wp-content>
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
来自&#34; tail的日志-f /var/log/apache2/access.log"当我创建新页面时,尝试立即访问它:
$myip - - [24/Jul/2017:16:57:04 +0200] "POST /wp-admin/post.php HTTP/1.1" 302 520 "http://example.net/wp-admin/post-new.php?post_type=page&wp-post-new-reload=true" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"
$myip - - [24/Jul/2017:16:57:04 +0200] "GET /wp-admin/post.php?post=12&action=edit&message=6 HTTP/1.1" 200 26740 "http://example.net/wp-admin/post-new.php?post_type=page&wp-post-new-reload=true" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"
$myip - - [24/Jul/2017:16:57:05 +0200] "GET /wp-admin/admin-ajax.php?action=oembed-cache&post=12 HTTP/1.1" 200 382 "http://example.net/wp-admin/post.php?post=12&action=edit" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"
$myip - - [24/Jul/2017:16:57:08 +0200] "GET /newpage/ HTTP/1.1" 404 507 "http://example.net/wp-admin/post.php?post=12&action=edit" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"
对于文件夹和文件权限,我跑了:
find /var/www/html/ -type d -exec chmod 755 {} \; && find /var/www/html/ -type f -exec chmod 644 {} \;
我已经尝试了所有我能想到的内容,包括设置教程,并从头开始重新安装wordpress和mysql,但无济于事。
提前致谢!