我刚刚安装了干净的 wordpress 并设置了它的 .htaccess,就像他们说的那样:
http://codex.wordpress.org/Using_Permalinks
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
当我尝试访问浏览器中的某个地址时,我http://localhost:888/blog/
从服务器收到 404 错误。我什至没有被 wordpress 引导到 wordpess 自己的 404 页面。
当我查看我网站的错误日志时:
[Sat Apr 20 10:43:36 2013] [error] [client 127.0.0.1] File does not exist: /home/alan/projects/pin_wp/blog, referer: http://localhost:888/
所以这让我想到我在某个地方搞砸了我的虚拟主机 conf - 因为我是那个领域的一个大菜鸟:
alan@alan:~/projects/pin_wp$ cat /etc/apache2/sites-enabled/localhost-pinwp
Listen 888
<VirtualHost *:888>
ServerAdmin webmaster@localhost
DocumentRoot /home/alan/projects/pin_wp
ServerName html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/alan/projects/pin_wp>
Options Indexes FollowSymLinks MultiViews +Includes
AllowOverride None
Order allow,deny
allow from all
AddOutputFilter INCLUDES .html
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error-pinwp.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access-pinwp.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
有人可以帮我解决这个问题并指出我这次犯了什么样的愚蠢错误。
艾伦
好吧,我几乎没有帮助就想通了。
我从以下位置更改了 apache conf:
至
现在一切正常。
艾伦