Deploy Bedrock + Sage to VPS hosting multiple websites

Its fixed! If anybody ever faces the same problem, this were the steps I took:

  1. Created an addon domain pointing to the /web folder.

  2. Created the following .htaccess file, also located in the /web folder:

     <IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteCond %{HTTP_HOST} ^(www.)?{{HOME_URL}}$
     RewriteCond %{REQUEST_URI} !^/wp/
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule ^(.*)$ /wp/$1
     RewriteCond %{HTTP_HOST} ^(www.)?{{HOME_URL}}$
     RewriteRule ^(/)?$ wp/index.php [L] 
     </IfModule>
    

(Replace {{HOME_URL}} with yourwebsite.com)

The admin section should now be available, if the pages arent displaying, save the permalink settings from admin.

1 Like