30 Sep

How to Check Website Speed and More Using Chrome’s Inspect Tool

If you’re looking for a quick way to check your website’s performance without installing any additional extensions, Chrome’s built-in Inspect tool is a great solution. This tool not only helps developers inspect the structure of a webpage but also provides powerful insights into website speed, performance, and more.

Here’s how you can use Chrome’s Inspect tool to analyze website speed and explore other features:

Checking Website Speed

  1. Open the Inspect Tool:
    • Right-click anywhere on your webpage and select Inspect, or use the shortcut Ctrl + Shift + I (Windows/Linux) or Cmd + Option + I (macOS).
  2. Use the Network Tab:
    • Click the Network tab in the Inspect window.
    • Reload the page (press F5) and Chrome will capture all the files that load during the page load process.
    • At the bottom of the panel, you’ll find useful metrics like:
      • DOMContentLoaded: Time it takes for the HTML content to be loaded and parsed.
      • Load Time: Total time for all elements (CSS, JS, images) to be fully loaded.
    • You can also see the waterfall view, showing the time taken by each individual resource.

More Features of Chrome’s Inspect Tool

Aside from checking website speed, here are other key features of the Inspect tool that can assist with website analysis:

  1. Elements Tab:
    • This tab shows the HTML structure and CSS styling of the page.
    • You can modify elements on the fly to see how changes affect the design without altering the actual code.
  2. Console Tab:
    • The Console logs JavaScript errors and warnings, allowing developers to troubleshoot problems.
    • You can also execute JavaScript code directly in the console.
  3. Performance Tab:
    • Provides a detailed analysis of your page’s performance.
    • Click Record or reload the page to capture an in-depth view of CPU usage, rendering, and the time spent on various tasks like scripting and painting.
  4. Lighthouse Tab:
    • Offers a comprehensive report on your site’s performance, accessibility, SEO, and best practices.
    • You can run an audit to get suggestions on how to improve your page speed and performance.
  5. Application Tab:
    • Gives you access to view and manage storage, service workers, cookies, and other application-level data.

Conclusion

The Chrome Inspect tool is a powerful all-in-one resource for checking website speed, reviewing code, and diagnosing problems. With just a few clicks, you can analyze load times, identify slow resources, and improve the overall performance of your website.

By leveraging these features, developers can quickly spot issues and optimize websites for better user experiences.

22 Sep

Resolving the “retry time not reached for any host” Error in cPanel Servers

As a server administrator, you might encounter the following error when your mail server attempts to send emails to certain domains:

retry time not reached for any host after a long failure period

This issue commonly arises due to a corruption in the Exim Retry Database. When the Retry Database is corrupted, Exim (the mail server) is unable to reattempt sending emails to the affected domains, leading to this error.

What Causes This?

The Exim Retry Database is responsible for managing email retries when the initial delivery attempt fails. If the database becomes corrupt or locked, your mail server may not attempt to deliver queued emails, resulting in delayed or undelivered messages to the affected domains.

How to Fix This

To resolve the issue, you need to clear and rebuild the Exim Retry Database. Below is the procedure for fixing this on a cPanel server running CentOS or other Linux distributions.

Step 1: Clear the Corrupt Database Files

Start by removing the corrupted retry and waiting files. SSH into your server as the root user and run the following commands:

cd /var/spool/exim/db
rm -f retry retry.lockfile
rm -f wait-remote_smtp wait-remote_smtp.lockfile

These commands delete the retry and wait-remote_smtp files, which contain the retry records for undelivered emails. Lock files are also deleted to ensure that no processes are currently using these databases.

Step 2: Restart the Exim Service

After removing the database files, restart Exim to allow it to recreate the necessary retry files and clear the issue:

service exim restart

For systems using systemd, you can alternatively use:

systemctl restart exim

Step 3: Clean Up the Exim Database

To ensure that old or invalid entries are cleared from the Exim database, you can use the exim_tidydb tool to remove retry records older than one day. Run the following commands:

/usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null
/usr/sbin/exim_tidydb -t 1d /var/spool/exim reject > /dev/null
/usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp > /dev/null

This cleans out stale records in the retry, reject, and wait-remote_smtp databases that may still be causing issues.

Step 4: Update Exim and Courier Services

For an added layer of assurance, it’s advisable to force updates of Exim and Courier. This can resolve any lingering issues with the mail system:

/scripts/courierup --force
/scripts/eximup --force

These commands will recompile and update both Exim and Courier to their latest stable versions, ensuring that no underlying issues with these services are present.

Conclusion

Following these steps should resolve the “retry time not reached for any host” error by cleaning up the Exim Retry Database and allowing your server to properly attempt mail delivery again. While this error is often reported for popular domains like Gmail, it can occur with any domain if there’s an issue with the Exim database or network interruptions. If the problem persists after taking these steps, it may indicate a deeper issue such as network misconfiguration or external mail filters affecting delivery.

12 Sep

How to Create a Subdomain in cPanel

cPanel has streamlined its interface, combining the Subdomain, Addon Domain, and Parked Domain options into a single menu called Domains. Subdomains are useful for directing visitors to specific sections of your website or hosting separate projects while keeping your main domain intact.

Follow the steps below to create a subdomain in your cPanel account:

Steps to Create a Subdomain:

  1. Log into your cPanel Account
    Once logged in, navigate to the Domains section and click on the Domains menu.
  2. Click the ‘Create A New Domain’ Button
    This option allows you to create a new domain or subdomain.
  3. Enter the Subdomain Name
    In the Domain text box, type in the subdomain you want to create, such as test.tetrahostbd.com. The format will be subdomain.maindomain.com.
  4. Customize the Directory for Your Subdomain
    By default, cPanel will create a directory for the subdomain inside the public_html folder.
    • Deselect the option “Share document root (/home/username/public_html) with ‘domain.tld’” if you want the subdomain to have a unique directory.
    • Specify the directory path where you want the subdomain’s files to be stored, or use the auto-generated directory.
  5. Submit Your Changes
    After entering the required information, click Submit to create your subdomain.

Important Notes:

  • The subdomain will be live within 5–10 minutes, although DNS propagation may take up to 30–40 minutes for the changes to fully take effect worldwide.

By following these steps, you can easily set up subdomains for different sections of your website or individual projects, all under the same cPanel account.

26 Aug

Fixing File and Directory Permissions for cPanel Users with a Bash Script

Managing file and directory permissions on a cPanel server is crucial for both security and functionality. Incorrect permissions can expose sensitive data or cause website errors. This guide shows you how to use a Bash script to quickly fix permissions for cPanel users.

Why Are Permissions Important?

In Linux systems, permissions determine who can read, write, or execute files and directories. The most common permission settings are:

  • Directories: 755 – Owner has full control; others can read and execute.
  • Files: 644 – Owner can read and write; others can only read.

These settings protect your files while allowing websites to function correctly.

Bash Script to Fix Permissions

Here’s a simple Bash script to adjust permissions for a specific cPanel user:

#!/bin/bash
# Script to fix permissions for a cPanel user

if [ "$#" -lt "1" ]; then
echo "Must specify user"
exit
fi

USER=$@

for user in $USER; do
HOMEDIR=$(egrep "^${user}:" /etc/passwd | cut -d: -f6)

if [ ! -f /var/cpanel/users/$user ]; then
echo "$user user file missing, likely an invalid user"
elif [ "$HOMEDIR" == "" ]; then
echo "Couldn't determine home directory for $user"
else
echo "Setting ownership and permissions for user $user"
chown -R $user:$user $HOMEDIR
chmod 711 $HOMEDIR
chown $user:nobody $HOMEDIR/public_html $HOMEDIR/.htpasswds
chown $user:mail $HOMEDIR/etc $HOMEDIR/etc/*/shadow $HOMEDIR/etc/*/passwd

find $HOMEDIR -type f -exec chmod 644 {} \; -print
find $HOMEDIR -type d -exec chmod 755 {} \; -print
find $HOMEDIR -type d -name cgi-bin -exec chmod 755 {} \; -print
find $HOMEDIR -type f \( -name "*.pl" -o -name "*.perl" \) -exec chmod 755 {} \; -print
fi
done

chmod 750 $HOMEDIR/public_html

if [ -d "$HOMEDIR/.cagefs" ]; then
chmod 775 $HOMEDIR/.cagefs
chmod 700 $HOMEDIR/.cagefs/tmp
chmod 700 $HOMEDIR/.cagefs/var
chmod 777 $HOMEDIR/.cagefs/cache
chmod 777 $HOMEDIR/.cagefs/run
fi

How to Use the Script

  1. Save the Script: Save the code to a file named fixperms.sh.
  2. Make It Executable: Run chmod +x fixperms.sh to make the script executable.
  3. Run the Script: Execute the script by running bash fixperms.sh <username>, replacing <username> with the cPanel username.

Conclusion

This script provides a quick way to standardize file and directory permissions for cPanel users, enhancing security and functionality. Always test scripts in a safe environment before applying them to production servers.

By following these steps, you can ensure that your cPanel environment is secure and operating smoothly.

13 Aug

How to Install PPTP VPN on Linux

Setting up a PPTP VPN server on a Linux machine is a straightforward process. This guide will walk you through the steps required to get your VPN server up and running.

Step 1: Install PPTPD

PPTP depends on the PPP and PPTPD packages. To install them, run the following commands:

yum install pptpd

Or, download and install the PPTPD package using:

wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.4.0-1.el6.x86_64.rpm
rpm -Uhv pptpd-1.4.0-1.el6.x86_64.rpm

Step 2: Configure PPTPD

After installation, you’ll need to configure the PPTPD server. Start by editing the IP settings in the /etc/pptpd.conf file:

nano /etc/pptpd.conf

Add or modify the following lines:

localip 192.168.0.1    # Server's primary IP
remoteip 192.168.0.100-200

Next, update the DNS settings in the /etc/ppp/options.pptpd file:

nano /etc/ppp/options.pptpd

Add the following lines:

ms-dns 8.8.8.8
ms-dns 8.8.4.4

Step 3: Create a VPN User

To allow access to the VPN server, you’ll need to create a user account. Add the user credentials in the /etc/ppp/chap-secrets file:

nano /etc/ppp/chap-secrets

Insert the following line:

username pptpd password *

Replace username and password with your desired credentials.

Step 4: Enable IP/Network Forwarding

IP forwarding is essential for routing packets between VPN clients and the internet. Enable IP forwarding by editing the /etc/sysctl.conf file:

nano /etc/sysctl.conf

Uncomment or add the following line:

net.ipv4.ip_forward = 1

To apply the changes, run:

sysctl -p

Step 5: Configure IPTables for NAT

NAT (Network Address Translation) allows VPN clients to access the internet through the server’s public IP. First, identify your network interface (e.g., eth0, ens33) by using the ifconfig command.

Assuming your network interface is eth0, add the following IPTables rules:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT

Save these rules to ensure they persist after a reboot.

Step 6: Start and Enable the PPTPD Service

Finally, start the PPTPD service and enable it to run at boot:

systemctl start pptpd
systemctl enable pptpd

Your PPTP VPN server is now set up and ready to use. You can connect to it using any PPTP VPN client with the user credentials created earlier.

23 May

Important Update: Google Workspace Pricing Adjustment Effective June 1, 2024

Thank you for your ongoing partnership with TetraHost for your Google Workspace services. We are writing to inform you about an upcoming adjustment to the pricing of our Google Workspace services, effective June 1, 2024.

This change is driven by two key factors: a recent pricing update from Google and the continuous upward trend in the dollar exchange rate. While we understand that any price increase can be concerning, we want to assure you that this adjustment is necessary to maintain the high-quality service you’ve come to expect from TetraHost.

Pricing Adjustment Details:

For Existing Users:

The new pricing will be reflected in your renewal invoice starting June 1, 2024.

For New Users:

Clients subscribing to our Google Workspace service after June 1, 2024, will be subject to the new pricing.

Despite these changes, our commitment to providing exceptional value and support remains unwavering. Google Workspace continues to offer innovative features and collaborative tools designed to help your business succeed.

If you have any questions or concerns about this pricing adjustment, please do not hesitate to contact our dedicated customer support team at support@tetrahostbd.com or +8801711825320. We are here to assist you with any inquiries.

We sincerely appreciate your understanding and continued trust in TetraHost as your Google Workspace service provider. We look forward to continuing to serve you with the highest level of service.

Thank you for your continued partnership.

22 Nov

Troubleshooting ‘WebSocket Handshake Failed’ Error in cPanel’s Terminal Feature

Encountering the “Error: The WebSocket handshake failed” message while using the Terminal feature in cPanel can be frustrating, especially if you’re accessing cPanel through a sub-domain like https://cpanel.yourdomain.com.

Why does this error happen?

When you try to open the Terminal in cPanel, it uses something called a “socket.” This socket needs to confirm where you’re connecting from. If it detects a proxy, it stops working.

How to solve it:

Mostly, this happens when user uses third party DNS server such as Cloudflare. Cloudflare’s way of hiding your real IP address causes this problem. To fix it, try accessing cPanel using a server IP address or the server’s hostname instead of the Cloudflare-protected one.

By doing this, you can bypass the error and use the Terminal feature in cPanel hassle-free.

Here’s what you can try to fix it:

1. Use these links to access cPanel >> Terminal:

– https://server-ip-ipaddress:2083
– https://server-hostname:2083

If these links don’t work, try these steps:

– Turn off any proxies or VPNs you might be using.
– Try different web browsers to see if that helps.

If you’re still experiencing issues with this problem, please reach out to our support team for assistance via https://www.tetrahostbd.com/contact.

17 Oct

Troubleshooting Network Issues Using MTR Reports

MTR, a network diagnostic tool, assesses the network connections between your physical location and your hosting server. It blends the capabilities of both ping and traceroute, enabling you to consistently monitor a remote server and observe how latency and performance change over time. To conduct an MTR test on Windows, you’ll need to install WinMTR, which can be obtained from this link.

Once it’s installed, launch WinMTR.

1. In the “Host” field, input the domain name or IP address you want to trace, and then click the “Start” button.
2. Allow it to run for at least 30 seconds, then click the “Stop” button.
3. Capture or export the results in either text or HTML format, and send them to your provider via email. This will help them to analyze the data(please include your public IP address as well).

27 Apr

Notice of Temporary Blockage of Our bKash Merchant Account

Dear Valued Clients,

We regret to inform you that our bKash Merchant account has been temporarily blocked by bKash authority. As a result, we are unable to process transactions through this account at the moment. We apologize for any inconvenience this may cause.

However, we have alternative payment options available for you to continue doing business with us. You can use our bKash Personal account with the number 01913377417, or Nagad Personal account with the same number for any transactions. Additionally, you can also use our company bank account or automated SSLCommerz payment gateway for hassle-free transactions.

We assure you that we are working closely with bKash to resolve this issue and we will notify you as soon as our Merchant account is available again. We thank you for your patience and understanding during this time.

If you have any questions or concerns, please do not hesitate to reach out to us.

Thank you,

TetraHost