Which file shall I edit in order to change the default page “This website is suspended” ?
Thanks
This is the default template file for suspension
/usr/local/hestia/data/templates/web/suspend/index.html
This is the default template file for IP access
/usr/local/hestia/data/templates/web/unassigned/index.html
This is the template file for error and default homepage
/usr/local/hestia/data/templates/web/skel/*
This is the default template file for IP access after installation
/var/www/*
These are all documented in the documentation repository
Brilliant! Many thanks
This is how to customize the default HTML template of hestia
Please upload it to your actual address after modification and replace the following related website addresses
Download the default HTML template file of the following path to the local computer for modification,
/usr/local/hestia/data/templates/web/skel/*
/usr/local/hestia/data/templates/web/suspend/*
/usr/local/hestia/data/templates/web/unassigned/*
Upload the HTML file of the above path to dns.hestiacp.com after modification and use the curl -fsSL command to perform a one-click replacement
curl -fsSL https://dns.hestiacp.com/replace.sh | bash
Note: The dns.hestiacp.com 1 domain name is a reference address. Please save it as replace.sh after completing the modification according to your actual situation, and add a file server website of yours to facilitate your subsequent use of the curl -fsSL command for one-click automatic replacement.
#!/bin/bash
dir_count=$(find /home/admin/web/ -maxdepth 1 -mindepth 1 -type d | wc -l)
if [ "$dir_count" -ne 1 ]; then
echo "Error: Make sure there is only one domain directory /home/admin/web/."
exit 1
fi
target_domain_dir=$(find /home/admin/web/ -maxdepth 1 -mindepth 1 -type d | head -n 1)
if [ ! -d "$target_domain_dir" ]; then
echo "Error: Domain not found /home/admin/web/."
exit 1
fi
curl -fsSL -o "${target_domain_dir}/document_errors/50x.html" "https://dns.hestiacp.com/web/skel/document_errors/50x.html"
curl -fsSL -o "${target_domain_dir}/document_errors/403.html" "https://dns.hestiacp.com/web/skel/document_errors/403.html"
curl -fsSL -o "${target_domain_dir}/document_errors/404.html" "https://dns.hestiacp.com/web/skel/document_errors/404.html"
curl -fsSL -o "${target_domain_dir}/document_errors/410.html" "https://dns.hestiacp.com/web/skel/document_errors/410.html"
curl -fsSL -o "${target_domain_dir}/public_html/index.html" "https://dns.hestiacp.com/web/skel/ubauntu/index.html"
curl -fsSL -o "/usr/local/hestia/data/templates/web/skel/document_errors/50x.html" "https://dns.hestiacp.com/web/skel/document_errors/50x.html"
curl -fsSL -o "/usr/local/hestia/data/templates/web/skel/document_errors/403.html" "https://dns.hestiacp.com/web/skel/document_errors/403.html"
curl -fsSL -o "/usr/local/hestia/data/templates/web/skel/document_errors/404.html" "https://dns.hestiacp.com/web/skel/document_errors/404.html"
curl -fsSL -o "/usr/local/hestia/data/templates/web/skel/document_errors/410.html" "https://dns.hestiacp.com/web/skel/document_errors/410.html"
curl -fsSL -o "/usr/local/hestia/web/error/50x.html" "https://dns.hestiacp.com/web/skel/document_errors/50x.html"
curl -fsSL -o "/usr/local/hestia/web/error/403.html" "https://dns.hestiacp.com/web/skel/document_errors/403.html"
curl -fsSL -o "/usr/local/hestia/web/error/404.html" "https://dns.hestiacp.com/web/skel/document_errors/404.html"
curl -fsSL -o "/usr/local/hestia/web/error/410.html" "https://dns.hestiacp.com/web/skel/document_errors/410.html"
curl -fsSL -o "/usr/local/hestia/data/templates/web/skel/public_html/index.html" "https://dns.hestiacp.com/web/skel/public_html/index.html"
curl -fsSL -o "/usr/local/hestia/data/templates/web/suspend/index.html" "https://dns.hestiacp.com/web/suspend/index.html"
curl -fsSL -o "/usr/local/hestia/data/templates/web/unassigned/index.html" "https://dns.hestiacp.com/web/unassigned/index.html"
curl -fsSL -o "/var/www/document_errors/50x.html" "https://dns.hestiacp.com/web/skel/document_errors/50x.html"
curl -fsSL -o "/var/www/document_errors/403.html" "https://dns.hestiacp.com/web/skel/document_errors/403.html"
curl -fsSL -o "/var/www/document_errors/404.html" "https://dns.hestiacp.com/web/skel/document_errors/404.html"
curl -fsSL -o "/var/www/document_errors/410.html" "https://dns.hestiacp.com/web/skel/document_errors/410.html"
curl -fsSL -o "/var/www/html/index.html" "https://dns.hestiacp.com/web/skel/ubauntu/index.html"
echo "The files in the relevant directory have been successfully modified"
Just change the default templates in /usr/local/hestia/data/templates/web/skel
folders and disable “Sync Skeleton”
Incorrect …
dns.hestiacp.com is the reference address, which is another address domain used as a file server
Request that this information be added to the hestiacp.com archive
This is my customized HTML example of /usr/local/hestia/data/templates/web/unassigned/index.html
If you need to display the website’s favicon.ico, please modify the favicon.ico code and display address in line 6 of the following html
It still maintains the original style, but adds content and current time display. (Note: You can customize the content you need).
Please copy the following content and save it as index.html to view it locally
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- If you need a custom favicon.ico for your webpage, please update the address and image here -->
<link rel="icon" href="https://dns.hestiacp.com/web/favicon.ico" type="image/x-icon">
<title>Welcome to Our Website!</title>
<style>
body {
background-color: #f5f5f5;
margin-top: 1%;
color: #5d5d5d;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.75);
text-align: center;
}
h1 {
font-size: 2.45em;
font-weight: 700;
color: #5aba47;
letter-spacing: -0.02em;
margin-bottom: 30px;
margin-top: 30px;
}
h2 {
font-size: 1.85em;
font-weight: 700;
color: #5aba47;
letter-spacing: -0.01em;
margin-bottom: 20px;
margin-top: 20px;
}
h3 {
font-size: 1.25em;
font-weight: 700;
color: #5aba47;
letter-spacing: -0.01em;
margin-bottom: 10px;
margin-top: 10px;
}
p {
font-size: 1em;
font-weight: 400;
color: #5aba47;
letter-spacing: normal;
margin-bottom: 15px;
margin-top: 0;
line-height: 1.5;
}
.center-content {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 100%;
}
pre {
background-color: #f5f5f5;
padding: 1em;
overflow: auto;
border-radius: 4px;
max-width: 100%;
box-sizing: border-box;
}
code {
display: block;
background-color: inherit;
}
body {
font-family: Arial, sans-serif;
}
.problem-column {
width: 200px;
}
table {
max-width: 900px;
width: 100%;
margin: 0 auto;
table-layout: fixed;
}
th, td {
padding: 10px;
color: #5aba47;
font-weight: bold;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
font-size: 1.2em;
color: #5aba47;
padding: 10px;
text-align: left;
background-color: #f2f2f2;
}
tfoot p, tfoot a, tfoot button {
font-weight: bold;
text-align: center;
}
tfoot td {
text-align: center;
}
tfoot pre {
}
.festival {
color: red;
}
.custom-h2 {
font-size: 1.85em;
font-weight: 700;
color: #5aba47;
letter-spacing: -0.01em;
margin-bottom: 20px;
margin-top: 20px;
}
.custom-p {
font-size: 1em;
font-weight: 400;
color: #5aba47;
fill: #5aba47;
letter-spacing: normal;
margin-bottom: 15px;
margin-top: 0;
line-height: 1.5;
}
.container {
width: 100%;
margin-right: auto;
margin-left: auto;
}
.animate__animated {
animation-duration: 1s;
animation-fill-mode: both;
}
.animate__fadeIn {
animation-name: fadeIn;
}
.info {
color: #5594cf;
fill: #5594cf;
}
.error {
color: #c92127;
fill: #c92127;
}
.warning {
color: #ffcc33;
fill: #ffcc33;
}
.success {
color: #5aba47;
fill: #5aba47;
}
.icon-large {
height: 132px;
width: 132px;
}
.description-text {
color: #5aba47;
letter-spacing: -0.01em;
font-size: 1.25em;
line-height: 20px;
}
.footer {
margin-top: 40px;
font-size: 0.7em;
}
.animate__delay-1s {
animation-delay: 1s;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col center-content">
<div class="col">
<i class="success">
<svg
class="success icon-large fa-check-circle"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
<path
d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"
></path>
</svg>
</i>
<h1>Access Successful!</h1>
</div>
<div class="container">
<div class="row">
<div class="col center-content">
<table>
<caption>
<h2>Welcome to the Hestia Server Control Panel. We sincerely invite you to contribute to Hestia. Please check out our <a class="header-button" href="https://github.com/hestiacp/hestiacp" target="_blank">GitHub</a> and <a class="header-button" href="https://forum.hestiacp.com" target="_blank">Official Forum</a>. Please post issues in English.</h2>
<h2>Here are some solutions (for reference)</h2>
</caption>
<thead>
<tr>
<th class="problem-column">Common Issues</th>
<th>Solutions</th>
</tr>
</thead>
<tbody>
<tr>
<td>1. Modify Custom Pages</td>
<td>Please check our official documentation. <a href="https://dns.hestiacp.com/docs/introduction/ssh.html#%E4%BF%AE%E6%94%B9hestia%E9%BB%98%E8%AE%A4html%E6%A8%A1%E6%9D%BF%E7%9A%84%E6%96%B9%E6%B3%95" target="_blank" rel="noopener noreferrer">Custom Pages</a> refer to previous discussions.</td>
</tr>
<tr>
<td>2. File Manager Errors</td>
<td>Please refer to our common error handling page <a href="https://dns.hestiacp.com/docs/introduction/ssh.html#%E6%96%87%E4%BB%B6%E7%AE%A1%E7%90%86%E5%99%A8%E9%94%99%E8%AF%AF" target="_blank" rel="noopener noreferrer">Error Handling</a> to request updates to the Hestia error documentation. Allow regular users to refer to and handle issues.</td>
</tr>
<tr>
<td>3. File Servers</td>
<td>When creating a website, you may need to create a separate file server. We recommend using <a href="https://github.com/prasathmani/tinyfilemanager" target="_blank" rel="noopener noreferrer">TinyFileManager</a> for its excellent performance in file management and easy deployment.</td>
</tr>
<tr>
<td>4. Replace Default HTML Files</td>
<td>After successfully installing the Hestia server panel, to provide a more localized and personalized user experience, we strongly recommend replacing the default English HTML templates with Chinese versions. This not only makes your server panel interface more in line with the reading habits of Chinese users but also demonstrates your extreme pursuit of detail and user experience. If you need to customize, please refer to <a href="https://dns.hestiacp.com/docs/introduction/ssh.html#%E4%BF%AE%E6%94%B9hestia%E9%BB%98%E8%AE%A4html%E6%A8%A1%E6%9D%BF%E7%9A%84%E6%96%B9%E6%B3%95" target="_blank" rel="noopener noreferrer">Custom Pages</a></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">
<p>Please copy the following code: (PS: Click the copy button)</p>
<pre><code id="debian-code">curl -fsSL https://dns.dns.hestiacp.com/replace.sh | bash</code></pre>
<button onclick="copyCode('debian-code')">Copy</button>
<br>
<br>
<br>
<p>Copy the script command above and execute it in your terminal. The script will automatically replace relevant files. (PS: It won't cause crashes! Please use it with confidence)</p>
</td>
</tr>
</tfoot>
</table>
<div class="center-content">
<h2>Current Time: <span id="currentDateTime"></span></h2>
</div>
</div>
</div>
</div>
<script>
function updateDateTime() {
const now = new Date();
const options = {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: false
};
const formattedDateTime = now.toLocaleString('en', options);
document.getElementById('currentDateTime').textContent = formattedDateTime;
}
window.onload = function() {
updateDateTime();
setInterval(updateDateTime, 1000);
};
</script>
<script>
function copyCode(codeElementId) {
var codeElement = document.getElementById(codeElementId);
if (document.createRange && window.getSelection) {
var range = document.createRange();
range.selectNodeContents(codeElement);
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
try {
var successful = document.execCommand('copy');
var msg = successful ? 'Copy Success' : 'Copy Failed';
console.log(msg);
alert(msg);
} catch (err) {
console.error('Copy Failed:', err);
}
window.getSelection().removeAllRanges();
}
}
</script>
</body>
</html>
You can just include the favicon in skeleton folder of you need.
I know. This is just sample code, there are instructions in the content. Modify the 6th line of html
Please refer to update the default hestia-related html pages of the current version to make them more complete in the new version, add prompts to let users know how to customize these contents, submit some repeated questions in the forum, nothing new, many contents are explained in the documents, but users just don’t read them, after users who use hestia install hestia, visit the IP and web management pages, and understand that some contents can be customized, which can solve some meaningless duplication problems. I am a fool and not very good at using GitHub to contribute to the hestacp source code, otherwise I would be happy to contribute to hestacp.