![]() |
|
Guide CloudPanel Site Shows 403 Forbidden or 404 Not Found: How to Fix It - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CloudPanel (https://adminsforum.com/Forum-cloudpanel) +---- Forum: CloudPanel Guides & Tutorials (https://adminsforum.com/Forum-cloudpanel-guides-tutorials) +----- Forum: CloudPanel Sites & Nginx Guides (https://adminsforum.com/Forum-cloudpanel-sites-nginx-guides) +----- Thread: Guide CloudPanel Site Shows 403 Forbidden or 404 Not Found: How to Fix It (/Thread-guide-cloudpanel-site-shows-403-forbidden-or-404-not-found-how-to-fix-it) |
CloudPanel Site Shows 403 Forbidden or 404 Not Found: How to Fix It - JAY - 10-23-2026 CloudPanel site shows 403 Forbidden or 404 Not Found: how to fix it Your site was created, the domain points to the server, but the browser shows 403 Forbidden or 404 Not Found. These are Nginx answering, which is good news: the server works, it just can't find or isn't allowed to show the right file. Here's how to find out why. Getting 403 in CloudPanel's own File Manager instead? That's a different problem: see CloudPanel File Manager 403 Forbidden. Seeing 502 or 504? See Fix 502 Bad Gateway in CloudPanel. Step 1: Read the error log The log usually names the exact problem. As root: Code: tail -n 30 /home/siteuser/logs/nginx/error.log403 Forbidden: the usual causes 1. No index file. The log says Code: directory index of "/home/.../htdocs/example.com/" is forbiddenCode: index.phpCode: index.htmlCode: ls -la /home/siteuser/htdocs/example.com/2. Wrong Root Directory. Many apps keep their public files in a sub-folder: Laravel uses Code: publicCode: publicCode: webCode: pubCode: example.com/public3. File ownership or permissions. Files uploaded as root, or extracted with odd permissions, can't be read by the site user. The log says Code: Permission deniedCode: chown -R siteuser:siteuser /home/siteuser/htdocs/example.com
su - siteuser
cd ~/htdocs/example.com
clpctl system:permissions:reset --directories=770 --files=660 --path=.Code: clpctl system:permissions:reset4. You blocked yourself. The site's Security tab can block IPs and bots and add Basic Auth. Check you didn't add your own IP or a whole range. See CloudPanel site security. 404 Not Found: the usual causes 1. Only the home page works, every other page 404s. Classic for WordPress, Laravel and other apps with "pretty" URLs. On Apache those rules live in Code: .htaccessCode: try_filesCode: location / {
try_files $uri $uri/ /index.php?$args;
}2. Files in the wrong place. Same as the 403 case: check Code: ls3. Upper and lower case. Linux file names are case-sensitive: Code: Logo.pngCode: logo.png4. The domain shows a different site. If you see another site's 404, the request isn't reaching the vhost you think. Check the domain spelling and the Code: wwwCode: server_nameCode: dig +short A example.comAfter every change Clear your browser cache or test in a private window, and if the site uses Varnish, purge the cache (site > Varnish Cache > Purge). Cached 404s are a common reason a fix "didn't work". Still stuck? Post the error log lines (hide your domain if you prefer) and which app you run. Sources: Nginx: try_files ยท CloudPanel documentation More CloudPanel troubleshooting
Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace Code: example.comCode: siteuser |