Cloned Bedrock site giving me 403 Forbidden


  • | 3525 points

    Hi, I've tried to clone a Bedrock / WordPress site from BitBucket that a client wants me to work on. I think I have all the environmental variables set up correctly so can anybody give me a hint to why the URL is returning a 403?

    I've run composer install.

    The directory structure looks fine:
    "C:/laragon/www/my-project/web/wp"
    "C:/laragon/www/my-project/web/app" etc.

    127.0.0.1 my-project.test in hosts

    my auto.my-project.test.conf has the following:
    define ROOT "C:/laragon/www/my-project/web"*
    define SITE "my-project.test"

    • This seems to be fine as if I change the root value to anything else the error message is different.

    My .env file at "C:/laragon/www/my-project/" has the following:
    WP_ENV='development'
    WP_HOME='http://my-project.test'
    WP_SITEURL="${WP_HOME}/wp"

    When I type in http://my-project.test to the address bar it resolves to:
    http://my-project.test/wp/wp-admin/install.php

    That's where I get the 403, "You don't have permission to access /wp/wp-admin/install.php on this server".

    If you have a Bedrock site running on Laragon could you compare your settings with mine? Thanks in advance.

    John..


  • | 3525 points

    To add to this my Apache logs are giving me the following error:

    [Tue May 18 11:57:26.530305 2021] [access_compat:error] [pid 2896:tid 1132] [client 127.0.0.1:49214] AH01797: client denied by server configuration: C:/laragon/www/my-project/web/wp/wp-admin/install.php, referer: http://my-project.test/wp/wp-admin/install.php


  • | 3525 points

    This appears to be fixed now by replacing the .htaccess file in /my-project/web/ with a basic version.

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress
    

Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.