index.php script will not run at webroot
I have recently migrated a WordPress blog over to a new ubuntu server running apach开发者_C百科e2. The
path of the blog is physically at /var/www/approot/public/home/blog/(wp-stuff here) which is the same path as the old server.
NOTE this is NOT a WordPress issue. I can execute a simple PHP script that I've created in this folder; phpinfo.php which returns just fine. However, the index.php returns a 403 forbidden message.
Weirdly, I can log into the WordPress console just fine if I access it directly at http://www.example.com/home/blog/wp-login.php and then http://www.example.com/home/blog/wp-admin/index.php.
But I cannot reach http://www.example.com/home/blog/index.php -- I get 403.
Also, I can access the categories pages, and any links under the ../home/blog/wp-content folders, but just not the main page.
I do have an .htaccess file which looks standard:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /home/blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /home/blog/index.php [L]
</IfModule>
# END WordPress
Also, permissions are set the same on all .php files in the ../home/blog/ folder
-rwxr-xr-x
Does anyone have any ideas of why the index.php is forbidden?
Sounds like the same issue I had.
Did you see a list of directories and and files instead of normal WordPress pages at http://www.example.com/home/blog/ and http://www.example.com/home/blog/wp-admin?
If yes, you'd need the following:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
(or something similar)
in either your httpd.conf (will apply to all virtual hosts) and each virtual host (if you're using virtual host)
加载中,请稍侯......
精彩评论