Bedrock installation on ubuntu server

I have a problem with bedrock and i could use some help.

I recently installed a WordPress server on my ubuntu server and i also made sure that both home and site url on wordpress are different.

Example:

Http://192.168.1.3 = wp_home /var/www/html

Http://192.168.1.3/wp = wp_site /var/www/html/wp

I also edited the apache2 “000-default.conf” file so the permalinks in my wordpress sever would work.

Now the reason im in need of help is cause i dont know how to do the final part where i need to Set the document root on my webserver to Bedrock’s web folder: which is /var/www/html/bedrock/web.

But the problem with it is when i edit the apache 000-default.conf and change the documentroot path from /var/www/html to /var/www/html/bedrock/web. The permalinks in the wordpress will stop working.

It’s all been a real headache and i really need some help with this.

There is an example configuration for Apache on the Bedrock docs:

The document root is set to /var/www/html/bedrock/web,
but why are you setting it to /var/www/html/bedrock,
in a separate configuration file (000-default.conf)?

oh, im sorry. i fixed the post. i wanted to say that it’s /var/www/html/bedrock/web but i typed it wrong. but ye when i change the documentroot path to /var/www/html/bedrock/web, the permalinks will not work.

Screenshot 2024-05-05 133355

I pretty much tried to copy and paste the code that was in the server configuration code cause the paths were pretty much similar to the ones i have.

Here is a screenshot of what my apache 000-default.conf looks like before i used the code that was in the server configuration part.

I think i figured it out (i think).

There’s a directory called “wp” in the folder structure part of the bedrock documentation.

I pretty much have the same directory in the /var/www/html/wp

so do i have to move or copy the /var/www/html/wp folder to /var/www/html/bedrock/web folder?

Also the Bedrock site configuration itself is important (.env file) for permalinks.
What configuration are you using there?

well this is what my .env file looks like right now.

1 Like

Yup it worked, i moved my wordpress core directory to the bedrock web directory and copy pasted the script in the apache web config and it works.

1 Like