【发布时间】:2018-10-04 02:16:21
【问题描述】:
我知道这个问题已经被问过很多次了。但是,我不得不发布这个,因为我已经关注了所有的帖子并且仍然收到这个错误。
我想用http://www.example.com/sample-post 之类的帖子名称更改我的永久链接设置。当我在 wordpress 管理员(设置/永久链接)中更改它并保存更改时,我的任何页面都找不到页面。
我看到 wordpress 可以访问主文件夹上的 .htaccess 文件,因为我删除了它一次,并且当我在 wordpress 管理员中重新启动我的永久链接设置时创建了它。 (设置/永久链接)
下面是我的 etc/apache2/apache2.conf
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>
AccessFileName .htaccess
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
非常感谢您阅读这篇长文并帮助朋友!而且,如果您有任何问题,请告诉我。
【问题讨论】:
标签: wordpress apache .htaccess ubuntu ubuntu-16.04