Thanks @noelforemgen – That error log does help to confirm that nginx is having trouble accessing those file, for example this line:
2024/02/04 15:42:36 [error] 33184#33376: *1387 CreateFile() "C:/Users/noelf/Local Sites/therealworldblueprint/app/public/wp-content/uploads/metropolis.black-webfont.woff" failed (5: Access is denied), client: 127.0.0.1, server: , request: "GET /wp-content/uploads/metropolis.black-webfont.woff HTTP/1.0", host: "therealworldblueprint.local", referrer: "https://therealworldblueprint.local/"
The CreateFile()
part is a windows-specific message. When combined with the (5: Access is denied)
error, it basically tells us that nginx doesn’t have the correct permissions to access that file.
Before going too much farther with troubleshooting, I want to verify – have you rebooted the computer at all since these things have happened? I ask because it’s possible that some other process is holding on to those files and preventing subsequent connections to them. If you haven’t done a hard rebooted, do so now.
Next, if that doesn’t help, you mentioned checking the file permissions and that they were 777
for folders and 666
for files. How did you go about verifying that information? Because this is Windows, I don’t think that the permissions model exactly mimic what’s in a Unix environment.
For these files that are having issues, can you navigate to them within Window’s file explorer and then right-click and select “Properties” – what do those permissions show you?
Additionally, since the error log is for the nginx process, we can think of it saying “nginx doesn’t have permission to access this file.”
Because of this, I’m curious about what Local’s running nginx process is. I think these steps should help with getting more details about nginx and the permissions it has when accessing one of these files:
- Open Task Manager by pressing Ctrl + Shift + Esc or by right-clicking on the taskbar and selecting “Task Manager”.
- In Task Manager, go to the “Details” tab.
- Look for the process name related to nginx service. It may be “nginx.exe” or something similar.
- Once you have identified the nginx process, note down its Process ID (PID).
Next, to check the permissions:
-
Open an elevated Command Prompt. Right-click on the Start button and select “Command Prompt (Admin)”.
-
In the command prompt, run the following command to get the list of open handles of the nginx process:
handle -p <PID> -a
Replace <PID>
with the process ID obtained from Task Manager.
-
Look for the file (for example, “metropolis.black-webfont.woff”` or the corresponding path mentioned in the error log in the output of the command.
-
The handle information should include the process name and the file handle permissions.
Let us know what you find while investigating!