<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[AdminsForum - CloudPanel Sites & Nginx Guides]]></title>
		<link>https://adminsforum.com/</link>
		<description><![CDATA[AdminsForum - https://adminsforum.com]]></description>
		<pubDate>Sun, 29 Nov 2026 09:15:58 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[CloudPanel Site Shows 403 Forbidden or 404 Not Found: How to Fix It]]></title>
			<link>https://adminsforum.com/Thread-guide-cloudpanel-site-shows-403-forbidden-or-404-not-found-how-to-fix-it</link>
			<pubDate>Fri, 23 Oct 2026 16:00:08 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://adminsforum.com/member.php?action=profile&uid=1">JAY</a>]]></dc:creator>
			<guid isPermaLink="false">https://adminsforum.com/Thread-guide-cloudpanel-site-shows-403-forbidden-or-404-not-found-how-to-fix-it</guid>
			<description><![CDATA[<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">CloudPanel site shows 403 Forbidden or 404 Not Found: how to fix it</span></span><br />
<br />
Your site was created, the domain points to the server, but the browser shows <span style="font-weight: bold;" class="mycode_b">403 Forbidden</span> or <span style="font-weight: bold;" class="mycode_b">404 Not Found</span>. 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.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Getting 403 in CloudPanel's own File Manager instead? That's a different problem: see <a href="https://adminsforum.com/Thread-guide-cloudpanel-file-manager-403-forbidden-diagnose-access-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel File Manager 403 Forbidden</a>. Seeing 502 or 504? See <a href="https://adminsforum.com/Thread-guide-fix-502-bad-gateway-in-cloudpanel" target="_blank" rel="noopener" class="mycode_url">Fix 502 Bad Gateway in CloudPanel</a>.</span><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 1: Read the error log</span></span><br />
The log usually names the exact problem. As root:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>tail -n 30 /home/siteuser/logs/nginx/error.log</code></div></div>More on logs in <a href="https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel logs: find and troubleshoot website errors</a>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">403 Forbidden: the usual causes</span></span><br />
<span style="font-weight: bold;" class="mycode_b">1. No index file.</span> The log says <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>directory index of "/home/.../htdocs/example.com/" is forbidden</code></div></div>. Nginx found the folder, but no <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>index.php</code></div></div> or <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>index.html</code></div></div> in it, and directory listing is off (as it should be). Upload your files, or check you didn't upload them into an extra sub-folder (a very common mistake when extracting a zip):<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>ls -la /home/siteuser/htdocs/example.com/</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">2. Wrong Root Directory.</span> Many apps keep their public files in a sub-folder: Laravel uses <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>public</code></div></div>, Symfony uses <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>public</code></div></div>, some others use <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>web</code></div></div> or <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>pub</code></div></div>. In CloudPanel, open the site, go to <span style="font-weight: bold;" class="mycode_b">Settings</span> and set the <span style="font-weight: bold;" class="mycode_b">Root Directory</span> to that folder (for example <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>example.com/public</code></div></div>).<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. File ownership or permissions.</span> Files uploaded as root, or extracted with odd permissions, can't be read by the site user. The log says <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>Permission denied</code></div></div>. Give the files back to the site user (as root), then let CloudPanel reset permissions to its own defaults (as the site user):<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>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></div></div><div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>clpctl system:permissions:reset</code></div></div> is CloudPanel's built-in command for this; 770/660 are the values from CloudPanel's documentation.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. You blocked yourself.</span> The site's <span style="font-weight: bold;" class="mycode_b">Security</span> tab can block IPs and bots and add Basic Auth. Check you didn't add your own IP or a whole range. See <a href="https://adminsforum.com/Thread-guide-cloudpanel-site-security-block-ips-and-bots-basic-auth-and-cloudflare-only" target="_blank" rel="noopener" class="mycode_url">CloudPanel site security</a>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">404 Not Found: the usual causes</span></span><br />
<span style="font-weight: bold;" class="mycode_b">1. Only the home page works, every other page 404s.</span> Classic for WordPress, Laravel and other apps with "pretty" URLs. On Apache those rules live in <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>.htaccess</code></div></div>, but <span style="font-weight: bold;" class="mycode_b">Nginx ignores .htaccess files completely</span>. The rules must be in the site's vhost. The fix is usually to use the right vhost template for your app: when you create a PHP site, CloudPanel lets you pick an application (WordPress, Laravel and many more) and sets up the right rules. For an existing site, compare the site's <span style="font-weight: bold;" class="mycode_b">Vhost</span> tab with a fresh site of the right type and look for the <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>try_files</code></div></div> line, for example:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>location / {
  try_files &#36;uri &#36;uri/ /index.php?&#36;args;
}</code></div></div>Edit the vhost carefully; a typo can take the site down. Save a copy of the old version first.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Files in the wrong place.</span> Same as the 403 case: check <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>ls</code></div></div> output and the Root Directory.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. Upper and lower case.</span> Linux file names are case-sensitive: <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>Logo.png</code></div></div> and <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>logo.png</code></div></div> are different files. Sites moved from Windows hosting often break here.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. The domain shows a different site.</span> If you see another site's 404, the request isn't reaching the vhost you think. Check the domain spelling and the <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>www</code></div></div> variant in the site's settings and vhost (<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>server_name</code></div></div> line), and that DNS points to this server: <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>dig +short A example.com</code></div></div>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">After every change</span></span><br />
Clear your browser cache or test in a private window, and if the site uses Varnish, purge the cache (site &gt; Varnish Cache &gt; Purge). Cached 404s are a common reason a fix "didn't work".<br />
<br />
Still stuck? Post the error log lines (hide your domain if you prefer) and which app you run.<br />
<br />
<span style="font-size: small;" class="mycode_size">Sources: <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files" target="_blank" rel="noopener" class="mycode_url">Nginx: try_files</a> · <a href="https://www.cloudpanel.io/docs/v2/introduction/" target="_blank" rel="noopener" class="mycode_url">CloudPanel documentation</a></span><br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">More CloudPanel troubleshooting</span></span><ul class="mycode_list"><li><a href="https://adminsforum.com/Thread-guide-cloudpanel-installation-failed-common-install-errors-and-how-to-fix-them" target="_blank" rel="noopener" class="mycode_url">Installation failed: common install errors</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-can-t-log-in-to-cloudpanel-port-8443-lost-password-and-2fa-fixes" target="_blank" rel="noopener" class="mycode_url">Can't log in: port 8443, password and 2FA</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-too-many-redirects-or-mixed-content-after-ssl-how-to-fix" target="_blank" rel="noopener" class="mycode_url">Too many redirects or mixed content after SSL</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-php-extension-missing-in-cloudpanel-check-enable-ioncube-and-fix-errors" target="_blank" rel="noopener" class="mycode_url">PHP extension missing / enable ionCube</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-wordpress-on-cloudpanel-asks-for-ftp-details-or-can-t-update-plugins-fix" target="_blank" rel="noopener" class="mycode_url">WordPress asks for FTP or can't update plugins</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-varnish-cache-showing-old-pages-or-breaking-logins-how-to-fix" target="_blank" rel="noopener" class="mycode_url">Varnish showing old pages or breaking logins</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-restore-a-site-from-a-cloudpanel-backup-files-and-database" target="_blank" rel="noopener" class="mycode_url">Restore a site from a backup</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-ssh-or-sftp-login-fails-permission-denied-and-connection-errors" target="_blank" rel="noopener" class="mycode_url">SSH or SFTP login fails</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-node-js-app-on-cloudpanel-shows-502-or-keeps-restarting-pm2-fixes" target="_blank" rel="noopener" class="mycode_url">Node.js app shows 502 or keeps restarting</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-site-hacked-how-to-find-malware-clean-up-and-lock-it-down" target="_blank" rel="noopener" class="mycode_url">Site hacked: find malware and clean up</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-clpctl-errors-in-cloudpanel-command-not-found-wrong-user-and-quoting-fixes" target="_blank" rel="noopener" class="mycode_url">clpctl errors: not found, wrong user, quoting</a><br />
</li>
</ul>
<br />
<span style="font-size: small;" class="mycode_size">Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>example.com</code></div></div> with your domain and <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>siteuser</code></div></div> with your site's user name (shown on the site's Settings page).</span>]]></description>
			<content:encoded><![CDATA[<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">CloudPanel site shows 403 Forbidden or 404 Not Found: how to fix it</span></span><br />
<br />
Your site was created, the domain points to the server, but the browser shows <span style="font-weight: bold;" class="mycode_b">403 Forbidden</span> or <span style="font-weight: bold;" class="mycode_b">404 Not Found</span>. 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.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Getting 403 in CloudPanel's own File Manager instead? That's a different problem: see <a href="https://adminsforum.com/Thread-guide-cloudpanel-file-manager-403-forbidden-diagnose-access-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel File Manager 403 Forbidden</a>. Seeing 502 or 504? See <a href="https://adminsforum.com/Thread-guide-fix-502-bad-gateway-in-cloudpanel" target="_blank" rel="noopener" class="mycode_url">Fix 502 Bad Gateway in CloudPanel</a>.</span><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 1: Read the error log</span></span><br />
The log usually names the exact problem. As root:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>tail -n 30 /home/siteuser/logs/nginx/error.log</code></div></div>More on logs in <a href="https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel logs: find and troubleshoot website errors</a>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">403 Forbidden: the usual causes</span></span><br />
<span style="font-weight: bold;" class="mycode_b">1. No index file.</span> The log says <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>directory index of "/home/.../htdocs/example.com/" is forbidden</code></div></div>. Nginx found the folder, but no <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>index.php</code></div></div> or <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>index.html</code></div></div> in it, and directory listing is off (as it should be). Upload your files, or check you didn't upload them into an extra sub-folder (a very common mistake when extracting a zip):<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>ls -la /home/siteuser/htdocs/example.com/</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">2. Wrong Root Directory.</span> Many apps keep their public files in a sub-folder: Laravel uses <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>public</code></div></div>, Symfony uses <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>public</code></div></div>, some others use <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>web</code></div></div> or <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>pub</code></div></div>. In CloudPanel, open the site, go to <span style="font-weight: bold;" class="mycode_b">Settings</span> and set the <span style="font-weight: bold;" class="mycode_b">Root Directory</span> to that folder (for example <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>example.com/public</code></div></div>).<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. File ownership or permissions.</span> Files uploaded as root, or extracted with odd permissions, can't be read by the site user. The log says <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>Permission denied</code></div></div>. Give the files back to the site user (as root), then let CloudPanel reset permissions to its own defaults (as the site user):<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>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></div></div><div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>clpctl system:permissions:reset</code></div></div> is CloudPanel's built-in command for this; 770/660 are the values from CloudPanel's documentation.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. You blocked yourself.</span> The site's <span style="font-weight: bold;" class="mycode_b">Security</span> tab can block IPs and bots and add Basic Auth. Check you didn't add your own IP or a whole range. See <a href="https://adminsforum.com/Thread-guide-cloudpanel-site-security-block-ips-and-bots-basic-auth-and-cloudflare-only" target="_blank" rel="noopener" class="mycode_url">CloudPanel site security</a>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">404 Not Found: the usual causes</span></span><br />
<span style="font-weight: bold;" class="mycode_b">1. Only the home page works, every other page 404s.</span> Classic for WordPress, Laravel and other apps with "pretty" URLs. On Apache those rules live in <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>.htaccess</code></div></div>, but <span style="font-weight: bold;" class="mycode_b">Nginx ignores .htaccess files completely</span>. The rules must be in the site's vhost. The fix is usually to use the right vhost template for your app: when you create a PHP site, CloudPanel lets you pick an application (WordPress, Laravel and many more) and sets up the right rules. For an existing site, compare the site's <span style="font-weight: bold;" class="mycode_b">Vhost</span> tab with a fresh site of the right type and look for the <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>try_files</code></div></div> line, for example:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>location / {
  try_files &#36;uri &#36;uri/ /index.php?&#36;args;
}</code></div></div>Edit the vhost carefully; a typo can take the site down. Save a copy of the old version first.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Files in the wrong place.</span> Same as the 403 case: check <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>ls</code></div></div> output and the Root Directory.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. Upper and lower case.</span> Linux file names are case-sensitive: <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>Logo.png</code></div></div> and <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>logo.png</code></div></div> are different files. Sites moved from Windows hosting often break here.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. The domain shows a different site.</span> If you see another site's 404, the request isn't reaching the vhost you think. Check the domain spelling and the <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>www</code></div></div> variant in the site's settings and vhost (<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>server_name</code></div></div> line), and that DNS points to this server: <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>dig +short A example.com</code></div></div>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">After every change</span></span><br />
Clear your browser cache or test in a private window, and if the site uses Varnish, purge the cache (site &gt; Varnish Cache &gt; Purge). Cached 404s are a common reason a fix "didn't work".<br />
<br />
Still stuck? Post the error log lines (hide your domain if you prefer) and which app you run.<br />
<br />
<span style="font-size: small;" class="mycode_size">Sources: <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files" target="_blank" rel="noopener" class="mycode_url">Nginx: try_files</a> · <a href="https://www.cloudpanel.io/docs/v2/introduction/" target="_blank" rel="noopener" class="mycode_url">CloudPanel documentation</a></span><br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">More CloudPanel troubleshooting</span></span><ul class="mycode_list"><li><a href="https://adminsforum.com/Thread-guide-cloudpanel-installation-failed-common-install-errors-and-how-to-fix-them" target="_blank" rel="noopener" class="mycode_url">Installation failed: common install errors</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-can-t-log-in-to-cloudpanel-port-8443-lost-password-and-2fa-fixes" target="_blank" rel="noopener" class="mycode_url">Can't log in: port 8443, password and 2FA</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-too-many-redirects-or-mixed-content-after-ssl-how-to-fix" target="_blank" rel="noopener" class="mycode_url">Too many redirects or mixed content after SSL</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-php-extension-missing-in-cloudpanel-check-enable-ioncube-and-fix-errors" target="_blank" rel="noopener" class="mycode_url">PHP extension missing / enable ionCube</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-wordpress-on-cloudpanel-asks-for-ftp-details-or-can-t-update-plugins-fix" target="_blank" rel="noopener" class="mycode_url">WordPress asks for FTP or can't update plugins</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-varnish-cache-showing-old-pages-or-breaking-logins-how-to-fix" target="_blank" rel="noopener" class="mycode_url">Varnish showing old pages or breaking logins</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-restore-a-site-from-a-cloudpanel-backup-files-and-database" target="_blank" rel="noopener" class="mycode_url">Restore a site from a backup</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-ssh-or-sftp-login-fails-permission-denied-and-connection-errors" target="_blank" rel="noopener" class="mycode_url">SSH or SFTP login fails</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-node-js-app-on-cloudpanel-shows-502-or-keeps-restarting-pm2-fixes" target="_blank" rel="noopener" class="mycode_url">Node.js app shows 502 or keeps restarting</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-site-hacked-how-to-find-malware-clean-up-and-lock-it-down" target="_blank" rel="noopener" class="mycode_url">Site hacked: find malware and clean up</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-clpctl-errors-in-cloudpanel-command-not-found-wrong-user-and-quoting-fixes" target="_blank" rel="noopener" class="mycode_url">clpctl errors: not found, wrong user, quoting</a><br />
</li>
</ul>
<br />
<span style="font-size: small;" class="mycode_size">Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>example.com</code></div></div> with your domain and <div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>siteuser</code></div></div> with your site's user name (shown on the site's Settings page).</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Fix 504 Gateway Timeout in CloudPanel]]></title>
			<link>https://adminsforum.com/Thread-guide-fix-504-gateway-timeout-in-cloudpanel</link>
			<pubDate>Fri, 16 Oct 2026 13:59:34 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://adminsforum.com/member.php?action=profile&uid=2">DEV</a>]]></dc:creator>
			<guid isPermaLink="false">https://adminsforum.com/Thread-guide-fix-504-gateway-timeout-in-cloudpanel</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">A CloudPanel 504 Gateway Timeout means a gateway waited too long for the next server in the request chain. Identify which hop timed out and why before increasing a timeout or adding PHP workers.</span><br />
<br />
This CloudPanel v2 diagnostic walkthrough is based on the official documentation. The branded image is a workflow illustration, not evidence of a newly induced outage. Paths, service names and timeout values below must be matched to your installation.<br />
<br />
<img src="https://adminsforum.com/attachment.php?aid=346" loading="lazy"  alt="[Image: attachment.php?aid=346]" class="mycode_img" /><br />
<span style="font-style: italic;" class="mycode_i">AdminsForum troubleshooting workflow: locate the timeout, explain the delay, then verify recovery.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">1. Capture the slow request</span><br />
Record the exact URL, HTTP status, time with timezone and approximate time spent waiting. Note recent changes, whether all sites fail, and whether only one operation such as search or report generation is affected. Repeat a harmless public request once. Do not repeatedly submit payments, imports or account changes: the backend may continue after the browser receives an error.<br />
<br />
Open <span style="font-weight: bold;" class="mycode_b">Sites → affected site → Logs</span> and click <span style="font-weight: bold;" class="mycode_b">Update</span> after the request. Compare Nginx access/error entries with the PHP or app log at that time. Our <a href="https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel logs guide</a> explains the viewer and SSH alternatives.<br />
<br />
If a CDN or Varnish is involved, trace the actual chain. A timeout at the outer gateway does not establish that PHP itself timed out. If the origin shows no matching request, investigate the preceding hop, routing and logging before changing PHP settings.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Distinguish connection time from response time</span><br />
Use the wording in the Nginx error log:<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">While connecting to upstream:</span> investigate the destination address/port, listener availability, routing, firewall and connection backlog. A long connection delay is different from slow application execution.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">While reading response header from upstream:</span> the next hop did not deliver its response headers in time. Investigate app work, queued workers, database waits and external API calls.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">While reading upstream response:</span> investigate a stalled or slow response stream and the appropriate read timeout.<br />
</li>
</ul>
For an immediate connection refusal, missing socket or crashed backend, start with our <a href="https://adminsforum.com/Thread-guide-fix-502-bad-gateway-in-cloudpanel" target="_blank" rel="noopener" class="mycode_url">502 Bad Gateway guide</a>. Neither status alone identifies the exact root cause.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. Measure a harmless URL</span><br />
On an SSH terminal, replace example.com and the path with your site and a safe GET route:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>curl --max-time 30 -sS -o /dev/null -w 'status=%{http_code} connect=%{time_connect}s first_byte=%{time_starttransfer}s total=%{time_total}s' https://example.com/</code></div></div>The output reports connection, first-byte and total elapsed times. First-byte time includes earlier phases; it is not a pure PHP execution measurement. If curl reaches its own 30-second limit, it can exit before the gateway responds: that does not prove a server timeout value is 30 seconds. Use the real log evidence and a justified test limit.<br />
<br />
A cached homepage may be fast while an uncached route fails. Test the affected route and compare equivalent requests, including authentication state, without sharing tokens. Do not disable TLS verification to make the test pass.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. Check PHP-FPM workers and application work</span><br />
In site <span style="font-weight: bold;" class="mycode_b">Settings</span>, confirm the selected PHP version. SSH's php -v may show another version. Find service names:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>systemctl list-units --type=service --all | grep -Ei 'php.*fpm'</code></div></div>If the site uses PHP 8.3 and php8.3-fpm.service is the correct unit, inspect recent messages:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo journalctl -u php8.3-fpm.service --since '30 minutes ago' --no-pager -n 100</code></div></div>Replace the unit for your server. Look for worker saturation, crashes and messages about pm.max_children. A queue can develop when workers spend too long on requests; raising the worker limit without a memory budget can cause swapping or OOM failures.<br />
<br />
Check the application's own log for slow imports, plugins, loops or failed dependencies. PHP-FPM supports request_slowlog_timeout and a slowlog destination for tracing slow requests. Enabling that is an administrator task: choose a private writable path and a measured threshold, back up the pool configuration, test it with the matching FPM binary, and apply during a suitable window. Restore temporary diagnostic settings after collecting evidence. Slow logs can contain sensitive application details.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">5. Check database waits and external dependencies</span><br />
Using an authorized database administration session, a read-only snapshot can help:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>SHOW FULL PROCESSLIST;</code></div></div>This can expose SQL text and user data, so inspect it privately and redact it before sharing. Visibility depends on database permissions. Long queries, lock waits and too many concurrent operations need different fixes. A single idle Sleep connection is not proof of a fault. Do not kill sessions or add indexes merely because a query appears once; establish what it is waiting for and whether it belongs to the failing request.<br />
<br />
For remote APIs, check the app's outbound connect/read timeouts, retry count and dependency health. A request that retries several slow API calls can exceed the gateway budget. Move lengthy exports or batch work into a queue/background job where practical; keep the web request responsible for starting or checking the job.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">6. Check server pressure</span><br />
Take a short snapshot rather than changing limits immediately:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>uptime
free -h
vmstat 1 5
df -h
df -i</code></div></div>In vmstat, compare later samples; its first row generally summarizes activity since boot. Investigate sustained CPU pressure, swapping, disk waits, a full filesystem or exhausted inodes alongside the failing request. Available memory is more useful than treating all cache as wasted RAM. A high load average alone does not distinguish CPU demand from I/O waits.<br />
<br />
For Node.js/Python sites, inspect the existing process manager and application logs as the site user. Confirm the configured App Port matches the actual HTTP app listener. Do not send HTTP probes to PHP-FPM's FastCGI listener.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">7. Change a timeout only after identifying its layer</span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">proxy_read_timeout:</span> applies where Nginx proxies to an HTTP backend using proxy_pass. It controls the idle interval between successive upstream reads, not a guaranteed total request runtime.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">fastcgi_read_timeout:</span> applies at a FastCGI hop using fastcgi_pass. It also measures the interval between reads.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">PHP max_execution_time:</span> is an execution limit with platform-dependent accounting; it is not the same as either Nginx timeout.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">FPM request_terminate_timeout:</span> can end a worker's request and is separate from PHP's execution limit.<br />
</li>
</ul>
Do not paste both Nginx directives into every server block or assume a universal CloudPanel default. Read the effective vhost and find the matching location/hop. CloudPanel's site Settings exposes common PHP limits; the Vhost Editor manages Nginx configuration. Back up the previous value, make one scoped change, validate configuration and preserve a rollback. Other layers such as the CDN or application server may still have shorter limits. Longer waits also hold resources longer.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">8. Verify recovery</span><br />
Repeat the same harmless route, confirm expected content and status, compare latency and check fresh logs. Test an uncached dynamic route as well as a normal page. Old timeout lines do not disappear when fixed, so use timestamps. If the change does not improve the measured symptom, restore it and continue diagnosis.<br />
<br />
For support, provide the site type, OS/CloudPanel/PHP versions, status, elapsed time, exact redacted timeout fragment, failing hop and recent changes. Keep credentials, private query data and tokens out of public logs.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">References</span><br />
<a href="https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout" target="_blank" rel="noopener" class="mycode_url">Nginx proxy read timeout</a><br />
<a href="https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_read_timeout" target="_blank" rel="noopener" class="mycode_url">Nginx FastCGI read timeout</a><br />
<a href="https://www.php.net/manual/en/install.fpm.configuration.php" target="_blank" rel="noopener" class="mycode_url">PHP-FPM slow log and request limits</a><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/settings/" target="_blank" rel="noopener" class="mycode_url">CloudPanel site settings</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=346" target="_blank" title="">cloudpanel-504-20261016.png</a> (Size: 61.18 KB / Downloads: 30)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">A CloudPanel 504 Gateway Timeout means a gateway waited too long for the next server in the request chain. Identify which hop timed out and why before increasing a timeout or adding PHP workers.</span><br />
<br />
This CloudPanel v2 diagnostic walkthrough is based on the official documentation. The branded image is a workflow illustration, not evidence of a newly induced outage. Paths, service names and timeout values below must be matched to your installation.<br />
<br />
<img src="https://adminsforum.com/attachment.php?aid=346" loading="lazy"  alt="[Image: attachment.php?aid=346]" class="mycode_img" /><br />
<span style="font-style: italic;" class="mycode_i">AdminsForum troubleshooting workflow: locate the timeout, explain the delay, then verify recovery.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">1. Capture the slow request</span><br />
Record the exact URL, HTTP status, time with timezone and approximate time spent waiting. Note recent changes, whether all sites fail, and whether only one operation such as search or report generation is affected. Repeat a harmless public request once. Do not repeatedly submit payments, imports or account changes: the backend may continue after the browser receives an error.<br />
<br />
Open <span style="font-weight: bold;" class="mycode_b">Sites → affected site → Logs</span> and click <span style="font-weight: bold;" class="mycode_b">Update</span> after the request. Compare Nginx access/error entries with the PHP or app log at that time. Our <a href="https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel logs guide</a> explains the viewer and SSH alternatives.<br />
<br />
If a CDN or Varnish is involved, trace the actual chain. A timeout at the outer gateway does not establish that PHP itself timed out. If the origin shows no matching request, investigate the preceding hop, routing and logging before changing PHP settings.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Distinguish connection time from response time</span><br />
Use the wording in the Nginx error log:<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">While connecting to upstream:</span> investigate the destination address/port, listener availability, routing, firewall and connection backlog. A long connection delay is different from slow application execution.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">While reading response header from upstream:</span> the next hop did not deliver its response headers in time. Investigate app work, queued workers, database waits and external API calls.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">While reading upstream response:</span> investigate a stalled or slow response stream and the appropriate read timeout.<br />
</li>
</ul>
For an immediate connection refusal, missing socket or crashed backend, start with our <a href="https://adminsforum.com/Thread-guide-fix-502-bad-gateway-in-cloudpanel" target="_blank" rel="noopener" class="mycode_url">502 Bad Gateway guide</a>. Neither status alone identifies the exact root cause.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. Measure a harmless URL</span><br />
On an SSH terminal, replace example.com and the path with your site and a safe GET route:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>curl --max-time 30 -sS -o /dev/null -w 'status=%{http_code} connect=%{time_connect}s first_byte=%{time_starttransfer}s total=%{time_total}s' https://example.com/</code></div></div>The output reports connection, first-byte and total elapsed times. First-byte time includes earlier phases; it is not a pure PHP execution measurement. If curl reaches its own 30-second limit, it can exit before the gateway responds: that does not prove a server timeout value is 30 seconds. Use the real log evidence and a justified test limit.<br />
<br />
A cached homepage may be fast while an uncached route fails. Test the affected route and compare equivalent requests, including authentication state, without sharing tokens. Do not disable TLS verification to make the test pass.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. Check PHP-FPM workers and application work</span><br />
In site <span style="font-weight: bold;" class="mycode_b">Settings</span>, confirm the selected PHP version. SSH's php -v may show another version. Find service names:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>systemctl list-units --type=service --all | grep -Ei 'php.*fpm'</code></div></div>If the site uses PHP 8.3 and php8.3-fpm.service is the correct unit, inspect recent messages:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo journalctl -u php8.3-fpm.service --since '30 minutes ago' --no-pager -n 100</code></div></div>Replace the unit for your server. Look for worker saturation, crashes and messages about pm.max_children. A queue can develop when workers spend too long on requests; raising the worker limit without a memory budget can cause swapping or OOM failures.<br />
<br />
Check the application's own log for slow imports, plugins, loops or failed dependencies. PHP-FPM supports request_slowlog_timeout and a slowlog destination for tracing slow requests. Enabling that is an administrator task: choose a private writable path and a measured threshold, back up the pool configuration, test it with the matching FPM binary, and apply during a suitable window. Restore temporary diagnostic settings after collecting evidence. Slow logs can contain sensitive application details.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">5. Check database waits and external dependencies</span><br />
Using an authorized database administration session, a read-only snapshot can help:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>SHOW FULL PROCESSLIST;</code></div></div>This can expose SQL text and user data, so inspect it privately and redact it before sharing. Visibility depends on database permissions. Long queries, lock waits and too many concurrent operations need different fixes. A single idle Sleep connection is not proof of a fault. Do not kill sessions or add indexes merely because a query appears once; establish what it is waiting for and whether it belongs to the failing request.<br />
<br />
For remote APIs, check the app's outbound connect/read timeouts, retry count and dependency health. A request that retries several slow API calls can exceed the gateway budget. Move lengthy exports or batch work into a queue/background job where practical; keep the web request responsible for starting or checking the job.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">6. Check server pressure</span><br />
Take a short snapshot rather than changing limits immediately:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>uptime
free -h
vmstat 1 5
df -h
df -i</code></div></div>In vmstat, compare later samples; its first row generally summarizes activity since boot. Investigate sustained CPU pressure, swapping, disk waits, a full filesystem or exhausted inodes alongside the failing request. Available memory is more useful than treating all cache as wasted RAM. A high load average alone does not distinguish CPU demand from I/O waits.<br />
<br />
For Node.js/Python sites, inspect the existing process manager and application logs as the site user. Confirm the configured App Port matches the actual HTTP app listener. Do not send HTTP probes to PHP-FPM's FastCGI listener.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">7. Change a timeout only after identifying its layer</span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">proxy_read_timeout:</span> applies where Nginx proxies to an HTTP backend using proxy_pass. It controls the idle interval between successive upstream reads, not a guaranteed total request runtime.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">fastcgi_read_timeout:</span> applies at a FastCGI hop using fastcgi_pass. It also measures the interval between reads.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">PHP max_execution_time:</span> is an execution limit with platform-dependent accounting; it is not the same as either Nginx timeout.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">FPM request_terminate_timeout:</span> can end a worker's request and is separate from PHP's execution limit.<br />
</li>
</ul>
Do not paste both Nginx directives into every server block or assume a universal CloudPanel default. Read the effective vhost and find the matching location/hop. CloudPanel's site Settings exposes common PHP limits; the Vhost Editor manages Nginx configuration. Back up the previous value, make one scoped change, validate configuration and preserve a rollback. Other layers such as the CDN or application server may still have shorter limits. Longer waits also hold resources longer.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">8. Verify recovery</span><br />
Repeat the same harmless route, confirm expected content and status, compare latency and check fresh logs. Test an uncached dynamic route as well as a normal page. Old timeout lines do not disappear when fixed, so use timestamps. If the change does not improve the measured symptom, restore it and continue diagnosis.<br />
<br />
For support, provide the site type, OS/CloudPanel/PHP versions, status, elapsed time, exact redacted timeout fragment, failing hop and recent changes. Keep credentials, private query data and tokens out of public logs.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">References</span><br />
<a href="https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout" target="_blank" rel="noopener" class="mycode_url">Nginx proxy read timeout</a><br />
<a href="https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_read_timeout" target="_blank" rel="noopener" class="mycode_url">Nginx FastCGI read timeout</a><br />
<a href="https://www.php.net/manual/en/install.fpm.configuration.php" target="_blank" rel="noopener" class="mycode_url">PHP-FPM slow log and request limits</a><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/settings/" target="_blank" rel="noopener" class="mycode_url">CloudPanel site settings</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=346" target="_blank" title="">cloudpanel-504-20261016.png</a> (Size: 61.18 KB / Downloads: 30)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Fix 502 Bad Gateway in CloudPanel]]></title>
			<link>https://adminsforum.com/Thread-guide-fix-502-bad-gateway-in-cloudpanel</link>
			<pubDate>Fri, 16 Oct 2026 13:48:18 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://adminsforum.com/member.php?action=profile&uid=2">DEV</a>]]></dc:creator>
			<guid isPermaLink="false">https://adminsforum.com/Thread-guide-fix-502-bad-gateway-in-cloudpanel</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">A 502 Bad Gateway error in CloudPanel usually means a gateway could not obtain a usable response from its upstream. Find which hop failed before changing PHP limits or restarting the server.</span><br />
<br />
This is a diagnostic guide for CloudPanel v2, checked against the official settings, vhost and PHP-FPM documentation. The diagram is an original workflow illustration; it is not a screenshot of a newly reproduced outage.<br />
<br />
<img src="https://adminsforum.com/attachment.php?aid=345" loading="lazy"  alt="[Image: attachment.php?aid=345]" class="mycode_img" /><br />
<span style="font-style: italic;" class="mycode_i">AdminsForum diagnostic workflow: identify the failed hop, check its backend, then verify recovery.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">1. Confirm the affected site and capture one failure</span><br />
Note the exact domain, URL, time, status and last deployment. In <span style="font-weight: bold;" class="mycode_b">Sites → your site → Logs</span>, update the Nginx error log immediately after one failed request. Also inspect the access log and application/PHP log. Follow our <a href="https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel logs walkthrough</a> if this is your first time using the viewer.<br />
<br />
Is every site failing, one site failing, or only PHP/dynamic requests failing? Existing static assets may work while PHP-FPM is unavailable. That narrows the search but does not identify the cause on its own. If a CDN is present, distinguish its gateway error from the origin response using the origin's matching log entries. Keep the origin firewall protections in place.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Read the message and upstream address</span><br />
Common log fragments and their next checks:<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">Connection refused while connecting to upstream:</span> Nothing accepted that connection, or it was actively rejected. Compare the logged address/port with the intended backend listener and check service status.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">No such file or directory for an upstream Unix socket:</span> The configured socket is missing. Check whether its service started and whether the vhost references the correct socket.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Permission denied for an upstream socket:</span> Check socket owner/group/mode and directory access. Do not fix this with chmod 777.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Upstream prematurely closed connection / reset by peer:</span> Inspect the backend's crash, worker and application logs at that time; also check for an out-of-memory kill.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Upstream sent too big header:</span> Inspect oversized cookies/response headers and the relevant FastCGI or proxy buffering configuration. This is a different fault from a stopped service.<br />
</li>
</ul>
A 504 timeout follows a different diagnostic branch: the backend may accept the connection but take too long to answer. Raising timeouts is not a general cure for 502 errors.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. PHP sites: check the selected PHP-FPM version</span><br />
Open the site's <span style="font-weight: bold;" class="mycode_b">Settings</span> and note its selected PHP version. The version returned by php -v in SSH can be different from the version serving the website. Discover installed service units:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>systemctl list-units --type=service --all | grep -Ei 'php.*fpm'</code></div></div>For a site using PHP 8.3, and only if php8.3-fpm.service is the matching unit, inspect:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo systemctl status php8.3-fpm.service --no-pager -l
sudo journalctl -u php8.3-fpm.service --since '30 minutes ago' --no-pager -n 100</code></div></div>Replace the version/unit for your installation. If failed, read the startup error first: a bad pool setting, invalid extension configuration or a listener conflict can prevent startup. A service marked active can still have a problem with a particular pool or worker.<br />
<br />
Compare the site's Vhost upstream with the pool's listen setting. An administrator can inspect the version's pool files; substitute the actual version:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo grep -RnsE '^[[:space:]]*listen[[:space:]]*=' /etc/php/8.3/fpm/pool.d/</code></div></div>Do not assume one universal CloudPanel FPM port. Use the upstream shown in your site's error and configuration, then check current TCP and Unix listeners:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo ss -ltnp
sudo ss -lxnp</code></div></div><span style="font-weight: bold;" class="mycode_b">PHP-FPM speaks FastCGI, not HTTP.</span> Do not curl its listener as though it were a Node.js web server. A failed HTTP probe to an FPM port does not diagnose the pool correctly.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. Node.js / Python sites: match App Port and process</span><br />
In the site's <span style="font-weight: bold;" class="mycode_b">Settings</span>, compare <span style="font-weight: bold;" class="mycode_b">App Port</span> with the application's configured listening port and the upstream address from the log. Check the application's own process manager as the site user. For an app managed with PM2:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>pm2 list
pm2 logs APP_NAME --lines 50 --nostream</code></div></div>Replace APP_NAME with that application's PM2 name. Running PM2 as root can show a different process list. For a systemd-managed app, inspect its actual unit instead. Do not start a second copy of an app while the process manager already controls it.<br />
<br />
For an HTTP-speaking app listening on local port 3000, a read-only local request can help:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>curl --max-time 10 -sS -D - -o /dev/null http://127.0.0.1:3000/</code></div></div>Use your actual host, port, protocol and harmless test path; 3000 is an example. Connection refused supports a listener/process problem. A response such as 404 or 401 shows that an HTTP server answered, but is not proof the intended page is healthy. An app that requires a specific Host header may behave differently. Do not expose the app port publicly to work around Nginx.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">5. Reverse proxies, Varnish and resource failures</span><br />
For a Reverse Proxy site, check its configured target URL, protocol, hostname and port. A hostname-based upstream may depend on DNS and routing. For a site using Varnish, follow the address of the failing hop rather than assuming Nginx connects directly to PHP.<br />
<br />
If the process repeatedly disappears, check resources and kernel messages:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>free -h
df -h
df -i
sudo journalctl -k --since '30 minutes ago' --no-pager | grep -Ei 'out of memory|oom|killed process'</code></div></div>A full filesystem, exhausted inodes or an OOM kill needs its own correction. Do not raise worker counts without measuring available memory. Save a short private diagnostic excerpt before changes; redact secrets before sharing it.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">6. Apply one justified correction, then verify</span><ul class="mycode_list"><li>If a deployment changed the listener or App Port incorrectly, restore the known working value and retain a copy of the current configuration.<br />
</li>
<li>If PHP-FPM cannot start, correct the specific reported configuration error. Test with the matching FPM binary/configuration before restarting that version's service.<br />
</li>
<li>If the application crashed, fix or roll back the bad deployment and use its existing process manager to restore it.<br />
</li>
<li>If you edit Nginx through CloudPanel's Vhost Editor, the panel checks syntax and reverts invalid changes. Syntax validation does not prove the backend is healthy. Keep a backup of your previous vhost anyway.<br />
</li>
</ul>
A restart can interrupt other sites using the same PHP service. When a restart is justified and the matching PHP configuration has passed its test, the PHP 8.3 example is:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo systemctl restart php8.3-fpm.service
sudo systemctl status php8.3-fpm.service --no-pager -l</code></div></div>Do not run that example against a different version. Re-test the exact failing URL, confirm expected page content and check fresh log timestamps. Verify both a normal public page and the affected dynamic route. If it fails again, preserve the new evidence rather than repeatedly rebooting.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Need help?</span><br />
Share the CloudPanel/OS versions, site type, PHP version or app runtime, exact error fragment, failing upstream (redacted as needed), time, recent change and what you already checked. Never share credentials or private keys.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">References</span><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/settings/" target="_blank" rel="noopener" class="mycode_url">CloudPanel site settings and App Port</a><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/vhost/" target="_blank" rel="noopener" class="mycode_url">CloudPanel Vhost Editor</a><br />
<a href="https://www.php.net/manual/en/install.fpm.configuration.php" target="_blank" rel="noopener" class="mycode_url">PHP-FPM pool configuration</a><br />
<a href="https://nginx.org/en/docs/http/ngx_http_proxy_module.html" target="_blank" rel="noopener" class="mycode_url">Nginx proxy configuration</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=345" target="_blank" title="">cloudpanel-502-20261016.png</a> (Size: 67.79 KB / Downloads: 33)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">A 502 Bad Gateway error in CloudPanel usually means a gateway could not obtain a usable response from its upstream. Find which hop failed before changing PHP limits or restarting the server.</span><br />
<br />
This is a diagnostic guide for CloudPanel v2, checked against the official settings, vhost and PHP-FPM documentation. The diagram is an original workflow illustration; it is not a screenshot of a newly reproduced outage.<br />
<br />
<img src="https://adminsforum.com/attachment.php?aid=345" loading="lazy"  alt="[Image: attachment.php?aid=345]" class="mycode_img" /><br />
<span style="font-style: italic;" class="mycode_i">AdminsForum diagnostic workflow: identify the failed hop, check its backend, then verify recovery.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">1. Confirm the affected site and capture one failure</span><br />
Note the exact domain, URL, time, status and last deployment. In <span style="font-weight: bold;" class="mycode_b">Sites → your site → Logs</span>, update the Nginx error log immediately after one failed request. Also inspect the access log and application/PHP log. Follow our <a href="https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors" target="_blank" rel="noopener" class="mycode_url">CloudPanel logs walkthrough</a> if this is your first time using the viewer.<br />
<br />
Is every site failing, one site failing, or only PHP/dynamic requests failing? Existing static assets may work while PHP-FPM is unavailable. That narrows the search but does not identify the cause on its own. If a CDN is present, distinguish its gateway error from the origin response using the origin's matching log entries. Keep the origin firewall protections in place.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Read the message and upstream address</span><br />
Common log fragments and their next checks:<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">Connection refused while connecting to upstream:</span> Nothing accepted that connection, or it was actively rejected. Compare the logged address/port with the intended backend listener and check service status.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">No such file or directory for an upstream Unix socket:</span> The configured socket is missing. Check whether its service started and whether the vhost references the correct socket.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Permission denied for an upstream socket:</span> Check socket owner/group/mode and directory access. Do not fix this with chmod 777.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Upstream prematurely closed connection / reset by peer:</span> Inspect the backend's crash, worker and application logs at that time; also check for an out-of-memory kill.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Upstream sent too big header:</span> Inspect oversized cookies/response headers and the relevant FastCGI or proxy buffering configuration. This is a different fault from a stopped service.<br />
</li>
</ul>
A 504 timeout follows a different diagnostic branch: the backend may accept the connection but take too long to answer. Raising timeouts is not a general cure for 502 errors.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. PHP sites: check the selected PHP-FPM version</span><br />
Open the site's <span style="font-weight: bold;" class="mycode_b">Settings</span> and note its selected PHP version. The version returned by php -v in SSH can be different from the version serving the website. Discover installed service units:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>systemctl list-units --type=service --all | grep -Ei 'php.*fpm'</code></div></div>For a site using PHP 8.3, and only if php8.3-fpm.service is the matching unit, inspect:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo systemctl status php8.3-fpm.service --no-pager -l
sudo journalctl -u php8.3-fpm.service --since '30 minutes ago' --no-pager -n 100</code></div></div>Replace the version/unit for your installation. If failed, read the startup error first: a bad pool setting, invalid extension configuration or a listener conflict can prevent startup. A service marked active can still have a problem with a particular pool or worker.<br />
<br />
Compare the site's Vhost upstream with the pool's listen setting. An administrator can inspect the version's pool files; substitute the actual version:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo grep -RnsE '^[[:space:]]*listen[[:space:]]*=' /etc/php/8.3/fpm/pool.d/</code></div></div>Do not assume one universal CloudPanel FPM port. Use the upstream shown in your site's error and configuration, then check current TCP and Unix listeners:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo ss -ltnp
sudo ss -lxnp</code></div></div><span style="font-weight: bold;" class="mycode_b">PHP-FPM speaks FastCGI, not HTTP.</span> Do not curl its listener as though it were a Node.js web server. A failed HTTP probe to an FPM port does not diagnose the pool correctly.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. Node.js / Python sites: match App Port and process</span><br />
In the site's <span style="font-weight: bold;" class="mycode_b">Settings</span>, compare <span style="font-weight: bold;" class="mycode_b">App Port</span> with the application's configured listening port and the upstream address from the log. Check the application's own process manager as the site user. For an app managed with PM2:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>pm2 list
pm2 logs APP_NAME --lines 50 --nostream</code></div></div>Replace APP_NAME with that application's PM2 name. Running PM2 as root can show a different process list. For a systemd-managed app, inspect its actual unit instead. Do not start a second copy of an app while the process manager already controls it.<br />
<br />
For an HTTP-speaking app listening on local port 3000, a read-only local request can help:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>curl --max-time 10 -sS -D - -o /dev/null http://127.0.0.1:3000/</code></div></div>Use your actual host, port, protocol and harmless test path; 3000 is an example. Connection refused supports a listener/process problem. A response such as 404 or 401 shows that an HTTP server answered, but is not proof the intended page is healthy. An app that requires a specific Host header may behave differently. Do not expose the app port publicly to work around Nginx.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">5. Reverse proxies, Varnish and resource failures</span><br />
For a Reverse Proxy site, check its configured target URL, protocol, hostname and port. A hostname-based upstream may depend on DNS and routing. For a site using Varnish, follow the address of the failing hop rather than assuming Nginx connects directly to PHP.<br />
<br />
If the process repeatedly disappears, check resources and kernel messages:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>free -h
df -h
df -i
sudo journalctl -k --since '30 minutes ago' --no-pager | grep -Ei 'out of memory|oom|killed process'</code></div></div>A full filesystem, exhausted inodes or an OOM kill needs its own correction. Do not raise worker counts without measuring available memory. Save a short private diagnostic excerpt before changes; redact secrets before sharing it.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">6. Apply one justified correction, then verify</span><ul class="mycode_list"><li>If a deployment changed the listener or App Port incorrectly, restore the known working value and retain a copy of the current configuration.<br />
</li>
<li>If PHP-FPM cannot start, correct the specific reported configuration error. Test with the matching FPM binary/configuration before restarting that version's service.<br />
</li>
<li>If the application crashed, fix or roll back the bad deployment and use its existing process manager to restore it.<br />
</li>
<li>If you edit Nginx through CloudPanel's Vhost Editor, the panel checks syntax and reverts invalid changes. Syntax validation does not prove the backend is healthy. Keep a backup of your previous vhost anyway.<br />
</li>
</ul>
A restart can interrupt other sites using the same PHP service. When a restart is justified and the matching PHP configuration has passed its test, the PHP 8.3 example is:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo systemctl restart php8.3-fpm.service
sudo systemctl status php8.3-fpm.service --no-pager -l</code></div></div>Do not run that example against a different version. Re-test the exact failing URL, confirm expected page content and check fresh log timestamps. Verify both a normal public page and the affected dynamic route. If it fails again, preserve the new evidence rather than repeatedly rebooting.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Need help?</span><br />
Share the CloudPanel/OS versions, site type, PHP version or app runtime, exact error fragment, failing upstream (redacted as needed), time, recent change and what you already checked. Never share credentials or private keys.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">References</span><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/settings/" target="_blank" rel="noopener" class="mycode_url">CloudPanel site settings and App Port</a><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/vhost/" target="_blank" rel="noopener" class="mycode_url">CloudPanel Vhost Editor</a><br />
<a href="https://www.php.net/manual/en/install.fpm.configuration.php" target="_blank" rel="noopener" class="mycode_url">PHP-FPM pool configuration</a><br />
<a href="https://nginx.org/en/docs/http/ngx_http_proxy_module.html" target="_blank" rel="noopener" class="mycode_url">Nginx proxy configuration</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=345" target="_blank" title="">cloudpanel-502-20261016.png</a> (Size: 67.79 KB / Downloads: 33)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[CloudPanel Logs: Find and Troubleshoot Website Errors]]></title>
			<link>https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors</link>
			<pubDate>Fri, 16 Oct 2026 12:56:30 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://adminsforum.com/member.php?action=profile&uid=2">DEV</a>]]></dc:creator>
			<guid isPermaLink="false">https://adminsforum.com/Thread-guide-cloudpanel-logs-find-and-troubleshoot-website-errors</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">To troubleshoot a CloudPanel website, reproduce one failed request, note its time and URL, then compare the Nginx access log, Nginx error log and PHP error log. Match the evidence before changing settings.</span><br />
<br />
This walkthrough uses CloudPanel v2. The screenshot below comes from our existing CloudPanel 2.5.4 / Ubuntu 24.04 lab guide. The log excerpts later in this post are illustrative examples, not fresh incidents on that server.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">1. Record the symptom first</span><br />
Write down the affected domain, exact page, HTTP status, time including timezone, and the last deployment or setting change. Test a public page once; do not repeatedly submit a checkout or other action that can create duplicate transactions. Keep passwords, session cookies and private query strings out of your notes.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Open the site's Log Viewer</span><br />
In CloudPanel, open <span style="font-weight: bold;" class="mycode_b">Sites</span>, choose the affected site and select <span style="font-weight: bold;" class="mycode_b">Logs</span>. Start with <span style="font-weight: bold;" class="mycode_b">NGINX → access.log</span>, choose a suitable line count and click <span style="font-weight: bold;" class="mycode_b">Update</span>. Repeat for the Nginx error log and the PHP error source. Available filenames can vary by installation. The viewer is a recent-lines view, so click Update after reproducing the request.<br />
<br />
<img src="https://adminsforum.com/attachment.php?aid=344" loading="lazy"  alt="[Image: attachment.php?aid=344]" class="mycode_img" /><br />
<span style="font-style: italic;" class="mycode_i">Our branded lab screenshot: the site's Logs tab, source selector, filename, line count and Update button.</span><br />
<br />
The screenshot contains automated requests for .env paths. A request appearing in the log does not prove a breach. Even a 200 status can be an application's fallback page; check what was returned before concluding that a private file was exposed. Do not paste any discovered secrets into a support thread.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. Use each log for the right question</span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">Nginx access log:</span> Did this request reach this server, and which HTTP status did it return?<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Nginx error log:</span> Did file access, a rewrite, or the connection to PHP/application upstream fail?<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">PHP error log:</span> Did the application raise an exception, run out of memory or fail to load a file?<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Database service log:</span> Did MySQL/MariaDB stop, restart or report a server-side failure? This is separate from the site's Nginx/PHP Log Viewer.<br />
</li>
</ul>
A database password error can appear in the application's PHP log even while the database service is healthy. Not every SQL query failure appears in the database server's error log.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. Read one access-log line</span><br />
Illustrative combined-format example:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>192.0.2.10 - - [16/Oct/2026:10:20:00 +0000] "GET /catalog HTTP/1.1" 500 842 "-" "ExampleBrowser"</code></div></div>Here /catalog is the requested path, 500 is the response status, and +0000 is the timestamp offset. Formats differ, so do not assume every installation uses the same field positions. Compare the matching minute in the error logs. A browser's local time may differ from the server's log time.<br />
<br />
If the request is absent, check the correct domain/site, timezone and log source. A CDN or cache may have served the response without reaching the origin. Also consider DNS pointing to another server, log buffering, rotated logs or a disabled access log. Do not restart services simply because the last 25 lines do not show your request.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">5. Find the files over SSH when you need more history</span><br />
CloudPanel documents the site's log tree under /home/SITE_USER/logs/. Replace SITE_USER with the actual site user shown in CloudPanel. Log in as that site user and list the available files:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>find /home/SITE_USER/logs/ -maxdepth 3 -type f -name '*.log' -print</code></div></div>Choose the exact path from that output; do not copy a CloudPanel v1 path into a v2 server. To read recent entries, replace the example path below with a real listed file:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>tail -n 100 -- /absolute/path/to/error.log</code></div></div>To watch that file while you make one test request:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>tail -n 30 -F -- /absolute/path/to/error.log</code></div></div>Press <span style="font-weight: bold;" class="mycode_b">Ctrl+C</span> to stop following. This stops the viewer, not the website. Search the current file for a known URL fragment:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>grep -nF -- '/catalog' /absolute/path/to/access.log | tail -n 20</code></div></div>No match is a clue, not proof that the request never happened: older entries may be in rotated or compressed files. A permission error means you need the correct site user or help from the server administrator; do not make log folders world-readable.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">6. Turn the message into a next check</span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">404 / file not found:</span> Compare the requested path with the document root, deployed files and application routing. A missing favicon is different from a missing homepage.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Permission denied:</span> Check the named file and parent directory ownership/permissions. Avoid blanket chmod 777 changes.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">PHP Fatal error / Uncaught exception:</span> Follow the named file and line, check the recent code change and the site's PHP version/extensions. A stack trace points to a failure location; it is not automatically the root cause.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Connection refused while connecting to upstream:</span> Check whether the intended PHP/application service is running and whether its configured listener matches the vhost.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Upstream timed out:</span> Correlate slow application work, database delays and resource pressure. Increasing timeouts alone can hide the cause.<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">7. Check a database service failure separately</span><br />
An administrator with sudo access can identify the service name without changing it:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>systemctl list-units --type=service --all | grep -Ei 'mysql|mariadb'</code></div></div>If the service is mysql.service, inspect a limited window:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo journalctl -u mysql.service --since '30 minutes ago' --no-pager -n 100</code></div></div>Use mariadb.service instead only if that is the unit on your server. Some installations write the detailed error log to a configured file rather than the journal; inspect the database's active log_error setting/configuration instead of assuming one universal pathname. Do not enable a busy general query log as a first troubleshooting step.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">8. Verify the fix and keep useful evidence</span><br />
Save the relevant error lines privately, make one justified change with a rollback plan, repeat the same request and check that the new error no longer appears. Confirm the expected page content as well as the status code. Old log lines remain after a fix; compare new timestamps. Leave public PHP error display disabled and remove temporary debug pages after testing.<br />
<br />
For support, share the CloudPanel version, OS, site type, PHP version, exact status, approximate time, recent change and a few redacted matching lines. Remove credentials, tokens, email addresses and visitor IPs where they are unnecessary.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Related walkthrough</span><br />
<a href="https://adminsforum.com/Thread-guide-cloudpanel-cron-jobs-logs-and-varnish-cache-complete-guide" target="_blank" rel="noopener" class="mycode_url">CloudPanel Cron Jobs, Logs and Varnish Cache</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">References</span><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/logs/" target="_blank" rel="noopener" class="mycode_url">CloudPanel v2 Log Viewer and log directory</a><br />
<a href="https://nginx.org/en/docs/http/ngx_http_log_module.html" target="_blank" rel="noopener" class="mycode_url">Nginx access-log formats and buffering</a><br />
<a href="https://dev.mysql.com/doc/refman/8.4/en/error-log-destination-configuration.html" target="_blank" rel="noopener" class="mycode_url">MySQL error-log destinations</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=344" target="_blank" title="">cloudpanel-log-viewer-branded.jpg</a> (Size: 147.05 KB / Downloads: 31)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">To troubleshoot a CloudPanel website, reproduce one failed request, note its time and URL, then compare the Nginx access log, Nginx error log and PHP error log. Match the evidence before changing settings.</span><br />
<br />
This walkthrough uses CloudPanel v2. The screenshot below comes from our existing CloudPanel 2.5.4 / Ubuntu 24.04 lab guide. The log excerpts later in this post are illustrative examples, not fresh incidents on that server.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">1. Record the symptom first</span><br />
Write down the affected domain, exact page, HTTP status, time including timezone, and the last deployment or setting change. Test a public page once; do not repeatedly submit a checkout or other action that can create duplicate transactions. Keep passwords, session cookies and private query strings out of your notes.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">2. Open the site's Log Viewer</span><br />
In CloudPanel, open <span style="font-weight: bold;" class="mycode_b">Sites</span>, choose the affected site and select <span style="font-weight: bold;" class="mycode_b">Logs</span>. Start with <span style="font-weight: bold;" class="mycode_b">NGINX → access.log</span>, choose a suitable line count and click <span style="font-weight: bold;" class="mycode_b">Update</span>. Repeat for the Nginx error log and the PHP error source. Available filenames can vary by installation. The viewer is a recent-lines view, so click Update after reproducing the request.<br />
<br />
<img src="https://adminsforum.com/attachment.php?aid=344" loading="lazy"  alt="[Image: attachment.php?aid=344]" class="mycode_img" /><br />
<span style="font-style: italic;" class="mycode_i">Our branded lab screenshot: the site's Logs tab, source selector, filename, line count and Update button.</span><br />
<br />
The screenshot contains automated requests for .env paths. A request appearing in the log does not prove a breach. Even a 200 status can be an application's fallback page; check what was returned before concluding that a private file was exposed. Do not paste any discovered secrets into a support thread.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">3. Use each log for the right question</span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">Nginx access log:</span> Did this request reach this server, and which HTTP status did it return?<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Nginx error log:</span> Did file access, a rewrite, or the connection to PHP/application upstream fail?<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">PHP error log:</span> Did the application raise an exception, run out of memory or fail to load a file?<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Database service log:</span> Did MySQL/MariaDB stop, restart or report a server-side failure? This is separate from the site's Nginx/PHP Log Viewer.<br />
</li>
</ul>
A database password error can appear in the application's PHP log even while the database service is healthy. Not every SQL query failure appears in the database server's error log.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">4. Read one access-log line</span><br />
Illustrative combined-format example:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>192.0.2.10 - - [16/Oct/2026:10:20:00 +0000] "GET /catalog HTTP/1.1" 500 842 "-" "ExampleBrowser"</code></div></div>Here /catalog is the requested path, 500 is the response status, and +0000 is the timestamp offset. Formats differ, so do not assume every installation uses the same field positions. Compare the matching minute in the error logs. A browser's local time may differ from the server's log time.<br />
<br />
If the request is absent, check the correct domain/site, timezone and log source. A CDN or cache may have served the response without reaching the origin. Also consider DNS pointing to another server, log buffering, rotated logs or a disabled access log. Do not restart services simply because the last 25 lines do not show your request.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">5. Find the files over SSH when you need more history</span><br />
CloudPanel documents the site's log tree under /home/SITE_USER/logs/. Replace SITE_USER with the actual site user shown in CloudPanel. Log in as that site user and list the available files:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>find /home/SITE_USER/logs/ -maxdepth 3 -type f -name '*.log' -print</code></div></div>Choose the exact path from that output; do not copy a CloudPanel v1 path into a v2 server. To read recent entries, replace the example path below with a real listed file:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>tail -n 100 -- /absolute/path/to/error.log</code></div></div>To watch that file while you make one test request:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>tail -n 30 -F -- /absolute/path/to/error.log</code></div></div>Press <span style="font-weight: bold;" class="mycode_b">Ctrl+C</span> to stop following. This stops the viewer, not the website. Search the current file for a known URL fragment:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>grep -nF -- '/catalog' /absolute/path/to/access.log | tail -n 20</code></div></div>No match is a clue, not proof that the request never happened: older entries may be in rotated or compressed files. A permission error means you need the correct site user or help from the server administrator; do not make log folders world-readable.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">6. Turn the message into a next check</span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">404 / file not found:</span> Compare the requested path with the document root, deployed files and application routing. A missing favicon is different from a missing homepage.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Permission denied:</span> Check the named file and parent directory ownership/permissions. Avoid blanket chmod 777 changes.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">PHP Fatal error / Uncaught exception:</span> Follow the named file and line, check the recent code change and the site's PHP version/extensions. A stack trace points to a failure location; it is not automatically the root cause.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Connection refused while connecting to upstream:</span> Check whether the intended PHP/application service is running and whether its configured listener matches the vhost.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Upstream timed out:</span> Correlate slow application work, database delays and resource pressure. Increasing timeouts alone can hide the cause.<br />
</li>
</ul>
<br />
<span style="font-weight: bold;" class="mycode_b">7. Check a database service failure separately</span><br />
An administrator with sudo access can identify the service name without changing it:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>systemctl list-units --type=service --all | grep -Ei 'mysql|mariadb'</code></div></div>If the service is mysql.service, inspect a limited window:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>sudo journalctl -u mysql.service --since '30 minutes ago' --no-pager -n 100</code></div></div>Use mariadb.service instead only if that is the unit on your server. Some installations write the detailed error log to a configured file rather than the journal; inspect the database's active log_error setting/configuration instead of assuming one universal pathname. Do not enable a busy general query log as a first troubleshooting step.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">8. Verify the fix and keep useful evidence</span><br />
Save the relevant error lines privately, make one justified change with a rollback plan, repeat the same request and check that the new error no longer appears. Confirm the expected page content as well as the status code. Old log lines remain after a fix; compare new timestamps. Leave public PHP error display disabled and remove temporary debug pages after testing.<br />
<br />
For support, share the CloudPanel version, OS, site type, PHP version, exact status, approximate time, recent change and a few redacted matching lines. Remove credentials, tokens, email addresses and visitor IPs where they are unnecessary.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Related walkthrough</span><br />
<a href="https://adminsforum.com/Thread-guide-cloudpanel-cron-jobs-logs-and-varnish-cache-complete-guide" target="_blank" rel="noopener" class="mycode_url">CloudPanel Cron Jobs, Logs and Varnish Cache</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">References</span><br />
<a href="https://www.cloudpanel.io/docs/v2/frontend-area/logs/" target="_blank" rel="noopener" class="mycode_url">CloudPanel v2 Log Viewer and log directory</a><br />
<a href="https://nginx.org/en/docs/http/ngx_http_log_module.html" target="_blank" rel="noopener" class="mycode_url">Nginx access-log formats and buffering</a><br />
<a href="https://dev.mysql.com/doc/refman/8.4/en/error-log-destination-configuration.html" target="_blank" rel="noopener" class="mycode_url">MySQL error-log destinations</a><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=344" target="_blank" title="">cloudpanel-log-viewer-branded.jpg</a> (Size: 147.05 KB / Downloads: 31)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[How to Create a PHP Site in CloudPanel (Step by Step, 2026)]]></title>
			<link>https://adminsforum.com/Thread-guide-how-to-create-a-php-site-in-cloudpanel-step-by-step-2026</link>
			<pubDate>Wed, 14 Oct 2026 19:43:21 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://adminsforum.com/member.php?action=profile&uid=1">JAY</a>]]></dc:creator>
			<guid isPermaLink="false">https://adminsforum.com/Thread-guide-how-to-create-a-php-site-in-cloudpanel-step-by-step-2026</guid>
			<description><![CDATA[<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">How to create a PHP site in CloudPanel</span></span><br />
<br />
This guide walks through adding a PHP site in CloudPanel, from the Add Site button to tuning PHP and Nginx. It's tested on CloudPanel 2.5.4 on Ubuntu 24.04, and every screenshot is from that server.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">You'll need:</span> CloudPanel installed and your admin login, plus a domain (or subdomain) you control. Pointing its DNS A record at the server now saves time later when you add SSL.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Prefer video?</span> Watch Part 4 of our free CloudPanel Full Course:<br />
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/1mobhMeCFLc" frameborder="0" allowfullscreen="true"></iframe><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 1: Open Sites → Add Site</span></span><br />
Log in to CloudPanel, open <span style="font-weight: bold;" class="mycode_b">Sites</span> and click <span style="font-weight: bold;" class="mycode_b">+ Add Site</span>.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=267" target="_blank" title="">g1-01-rn00.jpg</a> (Size: 58.52 KB / Downloads: 175)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 2: Choose "Create a PHP Site"</span></span><br />
CloudPanel asks what kind of site you want. WordPress has its own one-click option (see our WordPress guide); for any other PHP code choose <span style="font-weight: bold;" class="mycode_b">Create a PHP Site</span>.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=268" target="_blank" title="">g1-02-ae00.jpg</a> (Size: 104.91 KB / Downloads: 159)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 3: Pick the application</span></span><br />
The <span style="font-weight: bold;" class="mycode_b">Application</span> menu writes the right Nginx configuration for you. <span style="font-weight: bold;" class="mycode_b">Generic</span> works for most PHP code. For frameworks and shops pick the matching template (Laravel, Symfony, Magento, WooCommerce and others) so the rewrite rules are correct from the start.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=269" target="_blank" title="">g1-03-ae03.jpg</a> (Size: 87.73 KB / Downloads: 238)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 4: Domain, PHP version and site user</span></span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">Domain Name:</span> the domain or subdomain for this site.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">PHP Version:</span> any version from 7.1 to 8.5. We used 8.5, the newest.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Site User:</span> a real Linux user that will own the files and run the site's PHP processes. Each site gets its own, which keeps sites isolated from each other.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Site User Password:</span> CloudPanel generates a strong one. Save it in your password manager before you click <span style="font-weight: bold;" class="mycode_b">Create</span>.<br />
</li>
</ul>
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=270" target="_blank" title="">g1-04-ae04.jpg</a> (Size: 89.46 KB / Downloads: 152)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 5: The site is created</span></span><br />
A few seconds later the site appears in the list with its site user and app type. Click <span style="font-weight: bold;" class="mycode_b">Manage</span> to open it.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=271" target="_blank" title="">g1-05-ae07.jpg</a> (Size: 72.1 KB / Downloads: 168)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 6: Check the root directory</span></span><br />
The <span style="font-weight: bold;" class="mycode_b">Settings</span> tab shows the domain and its <span style="font-weight: bold;" class="mycode_b">Root Directory</span>. Frameworks like Laravel serve from a <br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>public</code></div></div> subfolder, so change it here if your app needs that.<br />
<br />
Underneath is the full path where your code goes:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>/home/SITE_USER/htdocs/YOUR_DOMAIN</code></div></div>Upload your files there over SFTP or with the File Manager.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=272" target="_blank" title="">g1-06-ae08.jpg</a> (Size: 100.32 KB / Downloads: 165)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 7: Site user password and SSH keys</span></span><br />
Further down you can generate a new password for the site user, or paste your public SSH key to log in without a password.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=273" target="_blank" title="">g1-07-ae10.jpg</a> (Size: 76.29 KB / Downloads: 164)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 8: Tune PHP for this site</span></span><br />
In <span style="font-weight: bold;" class="mycode_b">PHP Settings</span> you can switch the PHP version at any time and set <span style="font-weight: bold;" class="mycode_b">memory_limit</span>, <span style="font-weight: bold;" class="mycode_b">max_execution_time</span>, <span style="font-weight: bold;" class="mycode_b">max_input_time</span>, <span style="font-weight: bold;" class="mycode_b">max_input_vars</span>, <span style="font-weight: bold;" class="mycode_b">post_max_size</span> and <span style="font-weight: bold;" class="mycode_b">upload_max_filesize</span> for this site only, without editing any config files.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=274" target="_blank" title="">g1-08-ae11.jpg</a> (Size: 110.36 KB / Downloads: 166)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 9 (optional): The Nginx vhost</span></span><br />
The <span style="font-weight: bold;" class="mycode_b">Vhost</span> tab holds the site's full Nginx configuration. CloudPanel fills in the placeholders for certificates, root and logs. You rarely need it, but it's there for custom redirects, headers or rules, and the config is tested before it's saved.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=275" target="_blank" title="">g1-09-ae44.jpg</a> (Size: 108.72 KB / Downloads: 167)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Prefer the command line?</span></span><br />
As root, <span style="font-weight: bold;" class="mycode_b">clpctl</span> can create the same site, for example:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>clpctl site:add:php --domainName=example.com --phpVersion=8.5 --vhostTemplate='Generic' --siteUser=example --siteUserPassword='a-strong-password'</code></div></div><br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Next steps</span></span><ul class="mycode_list"><li>Add a free Let's Encrypt certificate: <span style="font-weight: bold;" class="mycode_b">How to install free SSL in CloudPanel</span> (CloudPanel Domains, DNS &amp; SSL Guides).<br />
</li>
<li>Create a database: <span style="font-weight: bold;" class="mycode_b">CloudPanel databases and phpMyAdmin</span> (CloudPanel Databases &amp; phpMyAdmin Guides).<br />
</li>
<li>Upload your files: <span style="font-weight: bold;" class="mycode_b">CloudPanel SSH, SFTP, FTP and File Manager</span> (CloudPanel Users, SSH &amp; SFTP Guides).<br />
</li>
</ul>
<br />
Stuck? Ask in <span style="font-weight: bold;" class="mycode_b">CloudPanel Sites &amp; Nginx Support</span>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">CloudPanel guide series</span></span><br />
<ol type="1" class="mycode_list"><li><a href="https://adminsforum.com/Thread-guide-what-is-cloudpanel-complete-overview-of-the-free-hosting-control-panel-2026" target="_blank" rel="noopener" class="mycode_url">What is CloudPanel? Complete overview</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-system-requirements-2026-os-cpu-ram-disk-and-ports" target="_blank" rel="noopener" class="mycode_url">CloudPanel system requirements</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-features-the-complete-list-2026" target="_blank" rel="noopener" class="mycode_url">CloudPanel features: the complete list</a><br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">How to create a PHP site</span> (you are here)<br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-install-a-free-let-s-encrypt-ssl-certificate-in-cloudpanel" target="_blank" rel="noopener" class="mycode_url">How to install free Let's Encrypt SSL</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-install-wordpress-in-cloudpanel-one-click-setup-guide" target="_blank" rel="noopener" class="mycode_url">How to install WordPress (one-click)</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-databases-create-a-database-users-and-use-phpmyadmin" target="_blank" rel="noopener" class="mycode_url">Databases, users and phpMyAdmin</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-ssh-sftp-ftp-and-file-manager-how-to-upload-files" target="_blank" rel="noopener" class="mycode_url">SSH, SFTP, FTP and File Manager</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-cron-jobs-logs-and-varnish-cache-complete-guide" target="_blank" rel="noopener" class="mycode_url">Cron jobs, logs and Varnish Cache</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-backups-and-security-remote-backups-firewall-and-basic-auth" target="_blank" rel="noopener" class="mycode_url">Backups, firewall and Basic Auth</a><br />
</li>
</ol>
]]></description>
			<content:encoded><![CDATA[<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">How to create a PHP site in CloudPanel</span></span><br />
<br />
This guide walks through adding a PHP site in CloudPanel, from the Add Site button to tuning PHP and Nginx. It's tested on CloudPanel 2.5.4 on Ubuntu 24.04, and every screenshot is from that server.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">You'll need:</span> CloudPanel installed and your admin login, plus a domain (or subdomain) you control. Pointing its DNS A record at the server now saves time later when you add SSL.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Prefer video?</span> Watch Part 4 of our free CloudPanel Full Course:<br />
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/1mobhMeCFLc" frameborder="0" allowfullscreen="true"></iframe><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 1: Open Sites → Add Site</span></span><br />
Log in to CloudPanel, open <span style="font-weight: bold;" class="mycode_b">Sites</span> and click <span style="font-weight: bold;" class="mycode_b">+ Add Site</span>.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=267" target="_blank" title="">g1-01-rn00.jpg</a> (Size: 58.52 KB / Downloads: 175)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 2: Choose "Create a PHP Site"</span></span><br />
CloudPanel asks what kind of site you want. WordPress has its own one-click option (see our WordPress guide); for any other PHP code choose <span style="font-weight: bold;" class="mycode_b">Create a PHP Site</span>.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=268" target="_blank" title="">g1-02-ae00.jpg</a> (Size: 104.91 KB / Downloads: 159)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 3: Pick the application</span></span><br />
The <span style="font-weight: bold;" class="mycode_b">Application</span> menu writes the right Nginx configuration for you. <span style="font-weight: bold;" class="mycode_b">Generic</span> works for most PHP code. For frameworks and shops pick the matching template (Laravel, Symfony, Magento, WooCommerce and others) so the rewrite rules are correct from the start.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=269" target="_blank" title="">g1-03-ae03.jpg</a> (Size: 87.73 KB / Downloads: 238)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 4: Domain, PHP version and site user</span></span><ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b">Domain Name:</span> the domain or subdomain for this site.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">PHP Version:</span> any version from 7.1 to 8.5. We used 8.5, the newest.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Site User:</span> a real Linux user that will own the files and run the site's PHP processes. Each site gets its own, which keeps sites isolated from each other.<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Site User Password:</span> CloudPanel generates a strong one. Save it in your password manager before you click <span style="font-weight: bold;" class="mycode_b">Create</span>.<br />
</li>
</ul>
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=270" target="_blank" title="">g1-04-ae04.jpg</a> (Size: 89.46 KB / Downloads: 152)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 5: The site is created</span></span><br />
A few seconds later the site appears in the list with its site user and app type. Click <span style="font-weight: bold;" class="mycode_b">Manage</span> to open it.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=271" target="_blank" title="">g1-05-ae07.jpg</a> (Size: 72.1 KB / Downloads: 168)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 6: Check the root directory</span></span><br />
The <span style="font-weight: bold;" class="mycode_b">Settings</span> tab shows the domain and its <span style="font-weight: bold;" class="mycode_b">Root Directory</span>. Frameworks like Laravel serve from a <br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>public</code></div></div> subfolder, so change it here if your app needs that.<br />
<br />
Underneath is the full path where your code goes:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>/home/SITE_USER/htdocs/YOUR_DOMAIN</code></div></div>Upload your files there over SFTP or with the File Manager.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=272" target="_blank" title="">g1-06-ae08.jpg</a> (Size: 100.32 KB / Downloads: 165)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 7: Site user password and SSH keys</span></span><br />
Further down you can generate a new password for the site user, or paste your public SSH key to log in without a password.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=273" target="_blank" title="">g1-07-ae10.jpg</a> (Size: 76.29 KB / Downloads: 164)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 8: Tune PHP for this site</span></span><br />
In <span style="font-weight: bold;" class="mycode_b">PHP Settings</span> you can switch the PHP version at any time and set <span style="font-weight: bold;" class="mycode_b">memory_limit</span>, <span style="font-weight: bold;" class="mycode_b">max_execution_time</span>, <span style="font-weight: bold;" class="mycode_b">max_input_time</span>, <span style="font-weight: bold;" class="mycode_b">max_input_vars</span>, <span style="font-weight: bold;" class="mycode_b">post_max_size</span> and <span style="font-weight: bold;" class="mycode_b">upload_max_filesize</span> for this site only, without editing any config files.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=274" target="_blank" title="">g1-08-ae11.jpg</a> (Size: 110.36 KB / Downloads: 166)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Step 9 (optional): The Nginx vhost</span></span><br />
The <span style="font-weight: bold;" class="mycode_b">Vhost</span> tab holds the site's full Nginx configuration. CloudPanel fills in the placeholders for certificates, root and logs. You rarely need it, but it's there for custom redirects, headers or rules, and the config is tested before it's saved.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://adminsforum.com/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=275" target="_blank" title="">g1-09-ae44.jpg</a> (Size: 108.72 KB / Downloads: 167)
<!-- end: postbit_attachments_attachment --><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Prefer the command line?</span></span><br />
As root, <span style="font-weight: bold;" class="mycode_b">clpctl</span> can create the same site, for example:<br />
<div class="codeblock"><div class="title af-code-title"><span>Code:</span><button type="button" class="af-code-copy" aria-label="Copy code" title="Copy code"><i class="far fa-copy" aria-hidden="true"></i><span>Copy</span></button><span class="af-code-status" role="status" aria-live="polite"></span></div><div class="body" dir="ltr"><code>clpctl site:add:php --domainName=example.com --phpVersion=8.5 --vhostTemplate='Generic' --siteUser=example --siteUserPassword='a-strong-password'</code></div></div><br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Next steps</span></span><ul class="mycode_list"><li>Add a free Let's Encrypt certificate: <span style="font-weight: bold;" class="mycode_b">How to install free SSL in CloudPanel</span> (CloudPanel Domains, DNS &amp; SSL Guides).<br />
</li>
<li>Create a database: <span style="font-weight: bold;" class="mycode_b">CloudPanel databases and phpMyAdmin</span> (CloudPanel Databases &amp; phpMyAdmin Guides).<br />
</li>
<li>Upload your files: <span style="font-weight: bold;" class="mycode_b">CloudPanel SSH, SFTP, FTP and File Manager</span> (CloudPanel Users, SSH &amp; SFTP Guides).<br />
</li>
</ul>
<br />
Stuck? Ask in <span style="font-weight: bold;" class="mycode_b">CloudPanel Sites &amp; Nginx Support</span>.<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">CloudPanel guide series</span></span><br />
<ol type="1" class="mycode_list"><li><a href="https://adminsforum.com/Thread-guide-what-is-cloudpanel-complete-overview-of-the-free-hosting-control-panel-2026" target="_blank" rel="noopener" class="mycode_url">What is CloudPanel? Complete overview</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-system-requirements-2026-os-cpu-ram-disk-and-ports" target="_blank" rel="noopener" class="mycode_url">CloudPanel system requirements</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-features-the-complete-list-2026" target="_blank" rel="noopener" class="mycode_url">CloudPanel features: the complete list</a><br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">How to create a PHP site</span> (you are here)<br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-install-a-free-let-s-encrypt-ssl-certificate-in-cloudpanel" target="_blank" rel="noopener" class="mycode_url">How to install free Let's Encrypt SSL</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-how-to-install-wordpress-in-cloudpanel-one-click-setup-guide" target="_blank" rel="noopener" class="mycode_url">How to install WordPress (one-click)</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-databases-create-a-database-users-and-use-phpmyadmin" target="_blank" rel="noopener" class="mycode_url">Databases, users and phpMyAdmin</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-ssh-sftp-ftp-and-file-manager-how-to-upload-files" target="_blank" rel="noopener" class="mycode_url">SSH, SFTP, FTP and File Manager</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-cron-jobs-logs-and-varnish-cache-complete-guide" target="_blank" rel="noopener" class="mycode_url">Cron jobs, logs and Varnish Cache</a><br />
</li>
<li><a href="https://adminsforum.com/Thread-guide-cloudpanel-backups-and-security-remote-backups-firewall-and-basic-auth" target="_blank" rel="noopener" class="mycode_url">Backups, firewall and Basic Auth</a><br />
</li>
</ol>
]]></content:encoded>
		</item>
	</channel>
</rss>