[英]Wordpress Apache Config Errors
I have installed Wordpress on Apache. 我已经在Apache上安装了Wordpress。 It appears to work fine, i get the homepage and have created pages on the admin.
看来工作正常,我进入了主页并在管理员页面上创建了页面。
I can access the home[page fine. 我可以访问首页[页面很好。 But when i try access the pages.
但是当我尝试访问页面时。 I get 404s.
我得到404。
http://mysite.com/ works fine http://mysite.com/正常运行
http://mysite.com/news throughs a 404. http://mysite.com/news通过404。
In the log files, I have the following error: 在日志文件中,出现以下错误:
[Fri Dec 14 10:21:58 2012] [error] [client 127.0.0.1] File does not exist: /home/wordpress/mysite/news, referer: http://mysite.com/ [2012年12月14日星期五10:21:58] [错误] [客户端127.0.0.1]文件不存在:/ home / wordpress / mysite / news,引荐网址 : http : //mysite.com/
I am using NameBasedVirtual hosting in Apache. 我在Apache中使用NameBasedVirtual托管。
<VirtualHost *:8080>
ServerName mysite.com
DocumentRoot /home/wordpress/mysite/
ErrorLog /var/log/www/mysite-error.log
CustomLog /var/log/www/mysite-access.log combined
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
<Directory /home/wordpress/mysite>
AllowOverride FileInfo Options
Allow from all
DirectoryIndex index.php
</Directory>
<Location /wp-admin/>
Header set Cache-Control no-cache
</Location>
</VirtualHost>
I looked at .htaccess. 我看着.htaccess。
It says . 它说 。
But Apache doesnt have mod_rewrite installed by default on Ubuntu. 但是Apache默认没有在Ubuntu上安装mod_rewrite。 So it didnt work and didnt through a nice error.
因此它没有工作,也没有通过一个不错的错误。
Just add in mod_rewrite to fix this 只需添加mod_rewrite即可解决此问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.