Bedrock nginx & permalinks making only homepage work and other pages throw 404

Hey Guys,

This is the 3rd topic I have posted today and all the others have been total noob questions that I ended up working out shortly after posting. I created a digital ocean droplet and ran composer create project roots/bedrock and have made minimal change to nginx vhosts I have got my site working after switching of permalinks but before that I could only view homepage all other pages were 404.

I can see some options to fix this but I wanted to check here first as I don’t see anything in the docs regarding how to configure this…

Here is my vhost file let me know if you want to see anything else:

Looks like your location / directive has the wrong try_files.

You should have:

location / {
  try_files $uri $uri/ /index.php?$args;
}

I suggest looking through our “official” confs. Not everything will apply to you but these have been extensively used and tested.

https://github.com/roots/bedrock-ansible/blob/master/roles/nginx/templates/wordpress.conf.j2