Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';在创建新的wordpress页面后,除了404之外,我什么也得不到_Wordpress_Apache - Fatal编程技术网

Can';在创建新的wordpress页面后,除了404之外,我什么也得不到

Can';在创建新的wordpress页面后,除了404之外,我什么也得不到,wordpress,apache,Wordpress,Apache,有人能帮忙吗 我在Ubuntu 16.04上安装了最新的apache2和wordpress。我的问题是,我无法在wordpress中创建一个新页面,然后在我的浏览器中访问它,即example.net/newpage。我刚刚得到一个404,我已经检查了我的永久链接设置,并且设置正确。Wordpress说页面已经创建,我可以在Wordpress界面中编辑它没有问题,如果它只是保存为草稿,我也可以查看它,只要我发布,我就会得到404 我的wordpress虚拟主机设置: <VirtualHost

有人能帮忙吗

我在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>
对于我运行的文件夹和文件权限:

find /var/www/html/ -type d -exec chmod 755 {} \; && find /var/www/html/ -type f -exec chmod 644 {} \;
我从一开始就尝试了我能想到的一切,包括安装教程和重新安装wordpress和mysql,但都没有成功


提前谢谢

从文章中可以看出,这可能是由于Apache中没有加载mod_rewrite模块造成的。

如果将设置中的永久链接更改为“普通”,会发生什么?然后页面显示在浏览器中,并添加了一个答案。稍微提醒您一下,如果我运行了“a2enmod rewrite”,那么这也解决了问题。哇,好几个小时的痛苦!谢谢你的帮助!
find /var/www/html/ -type d -exec chmod 755 {} \; && find /var/www/html/ -type f -exec chmod 644 {} \;