最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

errors - Primary (root) blog of multisite installation forbidden (403)

programmeradmin1浏览0评论

My WordPress multisite installation was just fine until today.

This morning, I decided to move the contents of my web-server from /var/www/html/ to /var/www/.

I grep'd for any files that had /var/www/html/ hard-coded, and dumped my WordPress MySQL database to check for any links to it. The only file I found in /var/www/html/wordpress/ that had it was the WPCACHEHOME entry in wp-config.php, so I changed that. The only references in the WordPress database was for the recently_edited entry, so there was no need to change it.

After moving /var/www/html/* to /var/www/ and adjusting all of the paths in the Apache config file to point to /var/www/ instead of /var/www/html/, I restarted the server and checked it. Other webpages are okay, but going to example/wordpress/ throws a 403 (forbidden) error.

I checked everything I could think of and did a web-search for "wordpress multisite 403" and checked everything people have suggested (90% were about permissions and 9.9% about .htaccess), but nothing worked. I gave up and put everything back the way it was, but it's still giving a 403.

I can access admin pages, as well as other blogs (e.g., example/wordpress/foobar/), it's only the primary blog (example/wordpress/) that gives a 403. Even example/wordpress/index.php gives the same error.

Here's what I've checked, tested, tried, and confirmed:

  • ✓ Browser cache cleared
  • ✓ Owner and group of /var/www/ and everything under it is www-data
  • ✓ Permissions of all directories under www are 775
  • ✓ Permissions of all files (that should be accessible) under www are 664
    • (No, setting them to 755 and 644 respectively won't fix it.)
  • ✓ Apache service has been restarted
  • ✓ Apache config file is correct
  • ✓ Web-server has been rebooted
  • wp-config.php is correct
  • ✓ All paths include trailing slash (/var/www/html/)
  • .htaccess hasn't been modified, but I tried renaming it anyway, as well as replacing it with a new, confirmed-correct copy for WPMU
  • wordpress/index.php is indeed present and unmodified
  • ✓ WordPress database has not been touched since it was last working
  • ✓ No changes made to WPMU format (subdirectories/subdomains)
  • ✓ The only files under wordpress/ that were modified are wordpress/wp-config.php (restored)
  • ✓ The directories in wordpress/wp-content/cache/ were deleted (blogs, autoptimize, and supercache) but recreated with correct permissions and owners (Autoptimize recreated directories and files in its folder)
  • ✓ There are no directories with the same name as the problem blog (it's the primary blog so what would that even be, /var/www/html/blogs//?
发布评论

评论列表(0)

  1. 暂无评论