What Is Freegate and How to Set It Up

In regions with internet censorship and restrictions, accessing free and open content on the web can be challenging. That’s where tools like Freegate come in.

If you’re new to Freegate or want to help others get started, this guide will explain what it is, how it works, and how to install and use it safely.


🔍 What Is Freegate?

Freegate is a free anti-censorship software developed by Dynamic Internet Technology (DIT), primarily used in China, Iran, and other countries with restricted internet access. It allows users to bypass the Great Firewall (GFW) and access blocked websites, including Google, YouTube, and many news platforms.

Freegate uses DynaWeb proxy servers (a system of encrypted tunnels) to provide users with secure and private access to the open internet.


🛡️ Key Features of Freegate

  • 💻 No installation required (portable EXE file)
  • 🔐 Encrypted tunneling through DynaWeb
  • 🌐 Supports both IE and Chrome/Firefox via proxy
  • ✅ No configuration needed — just run and connect
  • 💸 Completely free to use

📥 How to Download Freegate

  1. Visit a reliable mirror (Freegate’s website is often blocked in restricted regions):
  2. Download the latest version (usually a .zip file containing fg742p.exe or similar).
  3. Extract the file to a folder (no need to install).

🖥️ How to Use Freegate

  1. Run fgXXXp.exe (replace XXX with version number).
    • No installation needed; it runs as a standalone app.
  2. When prompted, choose your preferred mode:
    • Classic Mode (default) opens Internet Explorer with proxy enabled
    • Proxy Mode lets you configure external browsers like Chrome or Firefox
  3. Once connected, Freegate will display the DynaWeb homepage, confirming that your connection is active.

🌐 How to Use Freegate with Chrome or Firefox

If you prefer using Chrome or Firefox:

  1. Launch Freegate
  2. Go to your browser settings
  3. Set the HTTP proxy to:
    • 127.0.0.1
    • Port: 8580 (default used by Freegate)
  4. Save the settings and browse as usual — Freegate will tunnel traffic through DynaWeb.

📱 Can You Use Freegate on Mobile?

Unfortunately, Freegate is only available for Windows desktop environments. For mobile use, consider using:

  • VPN apps (WireGuard/OpenVPN + Hosteons VPS)
  • V2Ray or Shadowsocks with Android/iOS clients
  • Tor Browser (mobile)

⚠️ Important Notes

  • Freegate may not work reliably if deep packet inspection (DPI) is active on your network.
  • Because it uses a central set of proxy servers, Freegate performance may fluctuate depending on demand and censorship levels.
  • If you’re seeking a more stable and private option, consider running your own proxy server or VPN on a VPS (like one from Hosteons).

🚀 Want More Control? Use a VPS Instead

Freegate is great for beginners, but if you want more flexibility and privacy, consider deploying:

  • Shadowsocks or V2Ray on a Hosteons VPS
  • WireGuard VPN for all devices
  • Self-hosted proxies with IPv6 vHosts and custom rDNS

Hosteons offers:

  • ✅ Full root access
  • ✅ Global server locations
  • ✅ Inbound unmetered bandwidth
  • ✅ Up to 20 IPv6 IPs per VPS
  • ✅ Crypto & local payment options

🔗 Final Thoughts

Freegate is a powerful tool for quickly bypassing censorship and accessing open internet content. It’s ideal for casual users in restrictive environments — but power users will benefit from setting up their own VPS-based proxy for maximum control.

🧠 Want to go further? Check out our guides on:


Need a VPS to run your own private proxy?

👉 https://hosteons.com – starting at just $1.75/month

What is Webmin and How to Install It on Your Hosteons VPS

When managing a Linux server, command-line control is powerful — but not always beginner-friendly. That’s where Webmin comes in.

In this post, we’ll explain what Webmin is, why it’s useful, and how to install it on your Hosteons VPS in just a few steps.


🌐 What Is Webmin?

Webmin is a web-based system administration tool for Unix/Linux servers. It allows you to manage your VPS using a graphical interface right from your browser — no need to memorize long terminal commands.

🧰 With Webmin, you can:

  • Create/manage users & groups
  • Install and configure services (Apache, MySQL, FTP, etc.)
  • Manage firewall rules and cron jobs
  • View logs, system info, and performance
  • Configure network settings
  • Mount/unmount disks
  • Restart services — all from a clean web UI

This makes it a fantastic tool for VPS users — especially those who are new to Linux.


✅ Why Use Webmin on a Hosteons VPS?

Hosteons VPS plans come with full root access, allowing you to install and configure tools like Webmin easily.

Whether you’re using your VPS for hosting websites, databases, VPNs, or just learning Linux, Webmin makes daily management simpler — without giving up power or flexibility.


🛠️ How to Install Webmin on Your Hosteons VPS

We’ll walk through the steps to install Webmin on Debian/Ubuntu, which are two of the most popular operating systems available with Hosteons VPS.

🔐 Note: Webmin uses HTTPS by default. Make sure port 10000 is open in your firewall.


📥 Step 1: Update Your System

SSH into your VPS:

ssh root@your_vps_ip

Then update your package list:

apt update && apt upgrade -y

🔑 Step 2: Add Webmin’s Repository & Key

Install required dependencies:

apt install wget gnupg2 -y

Add Webmin’s GPG key:

wget -qO- https://download.webmin.com/jcameron-key.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/webmin.gpg

Add the Webmin repository:

echo "deb https://download.webmin.com/download/repository sarge contrib" | tee /etc/apt/sources.list.d/webmin.list

📦 Step 3: Install Webmin

Update and install Webmin:

apt update
apt install webmin -y

🌐 Step 4: Access Webmin in Your Browser

Once installed, Webmin runs on port 10000 by default.

Visit:

https://your-vps-ip:10000

🛡️ You’ll likely see a browser warning about the SSL certificate. This is normal for self-signed certs — just proceed.


🔐 Step 5: Log In

Use your root username and password (or sudo user) to log in.

Once inside, you’ll find a powerful web dashboard to manage your VPS.


🔄 Optional: Enable Webmin on Boot

It usually starts automatically, but to make sure:

systemctl enable webmin

You can also manage the service manually:

systemctl start webmin
systemctl stop webmin
systemctl restart webmin

🔁 Need to Allow Port 10000?

If you’re using UFW:

ufw allow 10000/tcp

Or with iptables:

iptables -A INPUT -p tcp --dport 10000 -j ACCEPT

✅ That’s It! You Now Have Webmin on Your Hosteons VPS

Webmin is a fantastic tool to make server administration easier and more visual. It’s lightweight, secure, and works great with all major Linux distributions.

💻 Need a VPS to get started?

Check out our plans at https://hosteons.com


🧠 Bonus Tip: Want even more features?

Webmin also supports:

  • Virtualmin (a cPanel-like module for website hosting)
  • Let’s Encrypt SSL setup
  • Scheduled backups
  • Package updates & monitoring

Perfect for developers, self-hosters, and small businesses.

🛡️ How to Check If Your VPS Is Compromised or Infected

If your VPS is behaving strangely, running slow, or using more resources than expected, it could be compromised. Here’s a simple step-by-step guide for Hosteons clients to help detect common signs of infection or unauthorized access.


✅ Step 1: Check for Unusual CPU or Memory Usage

Start by checking if any process is consuming excessive resources:

top

or use:

htop

Look for unfamiliar processes, especially those using a high percentage of CPU or memory.


🧠 Step 2: Check for Unknown Network Connections

You can inspect open ports and active connections with:

ss -tulnp

Also try:

netstat -antup

Check for unknown IP addresses or ports your VPS shouldn’t be using (e.g., cryptomining pools, spam servers, etc.).


🔍 Step 3: Scan Running Processes

List all processes with their command line details:

ps auxf

Watch for suspicious scripts, base64-encoded strings, or unfamiliar binaries.


🔐 Step 4: Check for New or Unauthorized Users

List all users:

cat /etc/passwd

Check recent logins:

last

Or failed login attempts:

grep "Failed password" /var/log/auth.log

Watch for users or login attempts you don’t recognize.


🕵️ Step 5: Inspect Cron Jobs & Scheduled Tasks

Malware often installs cron jobs to maintain persistence:

crontab -l
ls -la /etc/cron*

Look for unusual scripts or scheduled commands.


🐚 Step 6: Scan for Malware

Install and run a malware scanner like Chkrootkit or ClamAV:

Chkrootkit:

apt install chkrootkit   # Debian/Ubuntu
chkrootkit

ClamAV:

apt install clamav
freshclam
clamscan -r /

These tools help detect rootkits, backdoors, and trojans.


📁 Step 7: Check for Suspicious Files

Search for recently modified or hidden files:

find / -type f -mtime -2
find / -name ".*" -type f

Look especially in /tmp, /var/tmp, or /dev/shm — common hiding places for malicious scripts.


📜 Step 8: Check System Logs

Scan through /var/log/syslog, /var/log/auth.log, and /var/log/messages for any strange activity.

Example:

less /var/log/auth.log

Use grep to search for specific keywords like root, sudo, fail, etc.


🚨 What to Do If You Suspect a Compromise

If you suspect your VPS has been compromised:

1. Disconnect from the internet (disable the network interface).

2. Back up important data (be cautious with infected files).

3. Open a support ticket with Hosteons: https://my.hosteons.com

4. Consider wiping and reinstalling the OS for full peace of mind.

5. Change all relevant passwords and SSH keys.


🧯 Prevention Tips

• Use strong passwords and SSH keys

• Keep your software and OS updated

• Disable root login and use a non-root user with sudo

• Set up a firewall like ufw

• Regularly monitor your server


Stay secure,

The Hosteons Team

How to Set Up V2RaySSR on Your VPS – A Complete Guide

If you’re looking for a powerful, secure, and flexible proxy solution, V2RaySSR might be just what you need. It’s a custom fork of V2Ray that includes support for ShadowsocksR (SSR), allowing for more advanced configurations and better censorship resistance.

In this post, we’ll walk you through how to set up V2RaySSR on your Hosteons VPS step by step.


🔍 What is V2RaySSR?

V2RaySSR combines the flexibility of V2Ray with the popular ShadowsocksR protocol, offering:

• Support for multiple protocols (VMess, VLESS, SSR, SOCKS, etc.)

• Strong encryption

• Obfuscation methods like WebSocket, TLS, mKCP, and more

• Reliable bypassing of network restrictions

It’s a go-to tool for developers, privacy-conscious users, and tech enthusiasts who want full control over their internet traffic.


✅ What You’ll Need

Before getting started, make sure you have:

• A Hosteons VPS (Ubuntu/Debian/CentOS preferred)

• Root SSH access

• A domain name (optional but recommended for TLS/HTTPS)

• Basic familiarity with SSH


🔧 Step 1: Connect to Your VPS

Open your terminal or SSH client and log in to your VPS:

ssh root@your_vps_ip

Replace your_vps_ip with the actual IP of your server.


📦 Step 2: Download & Run the V2RaySSR Script

Use the following command to install V2RaySSR via a trusted script:

wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/V2raySSRR/master/v2ray.sh && bash v2ray.sh

This script will guide you through setup options like:

• Choosing the protocol (VMess, VLESS, SSR, etc.)

• Selecting ports

• Enabling TLS (for secure encrypted connections)

• WebSocket and fallback options

Take note of the configuration it generates — you’ll need it later for your client app.


🧱 Step 3: Open Required Ports

Depending on your server’s OS and firewall settings, you might need to manually open the necessary ports.

For Ubuntu/Debian with UFW:

ufw allow 443/tcp
ufw allow 443/udp

For CentOS with firewalld:

firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=443/udp
firewall-cmd --reload

📲 Step 4: Set Up Your V2RaySSR Client

Once the server is running, install a client on your device:

• WindowsV2RayN

• Androidv2rayNG

• iOS: Shadowrocket (App Store)

Input the configuration details (UUID, address, port, path, protocol, TLS settings, etc.) provided by the script.


🚀 Step 5: Test Your Setup

After everything is configured:

• Open your V2Ray client and connect

• Visit https://ipinfo.io or https://whatismyipaddress.com to confirm your traffic is routing through the VPS

• Check logs in the client app for errors or connection status


🛡️ Pro Tips

• Use a custom domain with Let’s Encrypt TLS for added security

• Change your UUID regularly to maintain privacy

• Keep your script and configuration up to date

• Monitor usage to ensure smooth operation and avoid abuse


Start building your own secure proxy with V2RaySSR — all powered by a Hosteons VPS.

How to Configure Your Hybrid Server for Optimal Performance

Hybrid servers, also known as Virtual Dedicated Servers (VDS), combine the power of dedicated servers with the flexibility of virtual environments. To ensure optimal performance for your hybrid server hosted on Hosteon’s cutting-edge Ryzen 7950x infrastructure, follow these key configuration steps:

1. Choose the Right Operating System (OS)

  • Linux vs. Windows: Select an OS based on your application needs. Linux distributions like Ubuntu, CentOS, or Debian are ideal for web servers, while Windows is better for applications requiring .NET frameworks or MSSQL.
  • Ensure your OS is updated with the latest security patches and updates.

2. Allocate Resources Efficiently

  • CPU and RAM: Monitor usage and allocate resources based on application demands. Use tools like htop on Linux or Task Manager on Windows to check resource utilization.
  • Disk Space: Keep at least 20% of your disk space free for optimal performance. Regularly clean up temporary files and unused data.

3. Secure Your Server

  • Firewall Configuration: Set up a firewall using tools like iptables (Linux) or Windows Defender Firewall. Only open necessary ports to reduce vulnerabilities.
  • SSH/Remote Desktop: Use secure SSH keys for Linux and strong passwords or RDP security settings for Windows.
  • Regular Updates: Regularly update your software, plugins, and operating system to patch vulnerabilities.

4. Optimize Network Settings

  • Bandwidth Utilization: Monitor your server’s bandwidth usage to prevent throttling or slowdowns. Tools like iftop can help you visualize usage.
  • DNS Settings: Configure a fast DNS provider to reduce latency.
  • Compression: Enable gzip compression on web servers like Apache or Nginx to improve load times.

5. Configure Web Server for Performance

  • Caching: Implement caching mechanisms like Memcached, Redis, or built-in caching options in Apache and Nginx.
  • HTTP/2 or HTTP/3: Upgrade your web server to use HTTP/2 or HTTP/3 for better performance and reduced latency.
  • Load Balancing: Use load balancers if hosting high-traffic applications.

6. Monitor Server Health

  • Install monitoring tools like Nagios, Zabbix, or Cloud-based monitoring solutions to keep an eye on uptime, resource utilization, and application performance.
  • Set up alerts for CPU, memory, or disk usage thresholds.

7. Database Optimization

  • Indexing: Ensure your databases are properly indexed to speed up queries.
  • Connection Pooling: Use connection pooling to manage multiple database connections efficiently.
  • Backups: Regularly back up your databases and test restoration processes.

8. Backups and Disaster Recovery

  • Utilize Hosteons’ free backup or snapshot feature to create regular backups.
  • Test your recovery processes periodically to ensure minimal downtime in case of failure.

9. Performance Tuning

  • Web Server Settings: Adjust configurations like worker processes in Nginx or MaxClients in Apache to match your traffic needs.
  • Database Settings: Tune MySQL/MariaDB configurations like innodb_buffer_pool_size for better performance.
  • Content Delivery Network (CDN): Integrate a CDN for faster content delivery to users across different geographical locations.

10. Regular Maintenance

  • Perform periodic maintenance like updating software, clearing logs, and defragmenting disks (if using non-SSD storage).
  • Review server logs for unusual activity or errors.

Conclusion

Configuring your hybrid server for optimal performance is an ongoing process. By following these steps and leveraging Hosteon’s high-performance Ryzen 7950x servers, you can ensure a seamless and efficient experience for your applications. Don’t forget to reach out to Hosteon’s 24/7 support team if you need assistance or have any questions about your server configuration.

Start optimizing today and unlock the full potential of your hybrid server!

Mastering DNS Settings for Seamless Hosting

When it comes to hosting your website, DNS (Domain Name System) settings play a crucial role in ensuring that your site is accessible, reliable, and performs optimally. Misconfigurations in DNS can lead to downtime, slow loading speeds, and even security vulnerabilities. In this guide, we will walk you through the essentials of mastering DNS settings for seamless hosting, helping you deliver a flawless online experience for your users.

What is DNS?

DNS is like the phonebook of the internet. It translates human-readable domain names (e.g., example.com) into IP addresses (e.g., 192.168.1.1) that computers use to locate servers. When users type your domain name into a browser, DNS ensures they are directed to the correct server hosting your website.

Key DNS Records You Need to Know

  1. A Record (Address Record):
  • Maps your domain name to an IPv4 address.
  • Example: example.com -> 192.0.2.1
  1. AAAA Record:
  • Similar to A records but maps to IPv6 addresses.
  • Example: example.com -> 2001:db8::1
  1. CNAME Record (Canonical Name):
  • Used to alias one domain name to another.
  • Example: www.example.com -> example.com
  1. MX Record (Mail Exchange):
  • Directs email to the correct mail server for your domain.
  • Example: mail.example.com -> 10 mailserver.example.com
  1. TXT Record:
  • Allows you to store text information for various purposes like domain verification or SPF (Sender Policy Framework) records.
  • Example: v=spf1 include:_spf.example.com ~all
  1. NS Record (Name Server):
  • Specifies the authoritative name servers for your domain.
  • Example: ns1.example.com, ns2.example.com
  1. PTR Record (Pointer Record):
  • Used for reverse DNS lookups, mapping IP addresses back to domain names.

Setting Up Your DNS for Hosting

  1. Choose Reliable DNS Hosting:
    Opt for a trusted DNS hosting provider with features like global redundancy, fast propagation, and easy-to-use management interfaces.
  2. Point Your Domain to Hosting Servers:
  • Update the A record to point to your hosting server’s IP address.
  • Configure the CNAME record for subdomains like www or blog.
  1. Set Up Email:
  • Use MX records to direct email traffic to your email server.
  • Add SPF, DKIM, and DMARC records to enhance email security.
  1. Enable CDN (Content Delivery Network):
    Use a CNAME record to point your domain or subdomain to your CDN provider’s URL for faster content delivery.
  2. Add Security Features:
  • Implement DNSSEC (DNS Security Extensions) to prevent DNS spoofing.
  • Configure TXT records for SPF, DKIM, and DMARC to protect against email fraud.
  1. Monitor and Test DNS Configuration:
    Use tools like dig, nslookup, or online DNS checkers to verify your records and resolve any errors.

Common DNS Pitfalls and How to Avoid Them

  1. Propagation Delays:
  • DNS changes can take up to 48 hours to propagate. Plan ahead to avoid downtime.
  1. Incorrect TTL (Time-to-Live) Settings:
  • Setting TTL too low can lead to frequent lookups, increasing latency. Set an optimal TTL based on your requirements.
  1. Misconfigured Records:
  • Double-check your records to ensure they point to the correct servers.
  1. Ignoring Backup DNS Servers:
  • Always configure secondary (backup) name servers for redundancy.

Advanced Tips for DNS Optimization

  1. Use GeoDNS:
  • Route traffic based on users’ geographical locations for better performance.
  1. Leverage DNS Load Balancing:
  • Distribute traffic across multiple servers to ensure reliability and scalability.
  1. Automate DNS Management:
  • Use APIs or automation tools to update DNS settings quickly, especially for dynamic environments.

Conclusion

Mastering DNS settings is a vital skill for website owners and hosting professionals alike. By understanding the fundamental DNS records, avoiding common pitfalls, and optimizing configurations, you can ensure your website remains accessible, secure, and performs efficiently. At Hosteons, we provide robust hosting solutions that integrate seamlessly with DNS management, helping you focus on growing your online presence without worrying about technical roadblocks.

Need assistance with DNS or hosting? Our support team is available 24/7 to guide you every step of the way. Visit Hosteons to explore our hosting solutions today!

How to Install and Set Up V2Ray or ShadowsocksR (SSR) on Your VPS

V2Ray and ShadowsocksR (SSR) are popular tools for bypassing internet restrictions and enhancing online privacy. With Hosteons’ VPS, you can easily set up your own private proxy server using V2Ray or SSR. This tutorial will guide you through the installation and configuration process step by step.

Prerequisites

Before you begin, ensure you have:

  1. A VPS: Hosteons provides reliable VPS solutions with root access.
  2. Linux OS: Ubuntu 20.04 or Debian 11 are recommended.
  3. Root Access: Administrative privileges on your VPS.

Step 1: Update Your VPS

Start by updating your system to ensure all packages are up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install V2Ray

  1. Download the official V2Ray installation script:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
  1. Start and enable V2Ray:
sudo systemctl start v2ray
sudo systemctl enable v2ray
  1. Confirm that V2Ray is running:
sudo systemctl status v2ray

Step 3: Configure V2Ray

  1. Open the V2Ray configuration file:
sudo nano /usr/local/etc/v2ray/config.json
  1. Add the following basic configuration:
{
  "inbounds": [
    {
      "port": 1080,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "YOUR_UUID",
            "alterId": 64
          }
        ]
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}
  • Replace YOUR_UUID with a unique UUID. Generate one using:
uuidgen
  1. Save and exit the file.
  2. Restart V2Ray to apply the changes:
sudo systemctl restart v2ray

Step 4: Install ShadowsocksR (SSR)

If you prefer SSR over V2Ray, follow these steps:

  1. Clone the SSR repository:
git clone https://github.com/shadowsocksrr/shadowsocksr.git
  1. Navigate to the SSR directory:
cd shadowsocksr
  1. Run the setup script:
bash setup_cymysql.sh
  1. Configure SSR by editing the configuration file:
nano user-config.json

Add the following settings:

{
  "server": "0.0.0.0",
  "server_port": 8388,
  "password": "YOUR_PASSWORD",
  "method": "aes-256-cfb",
  "protocol": "auth_sha1_v4",
  "obfs": "tls1.2_ticket_auth",
  "timeout": 300
}
  • Replace YOUR_PASSWORD with a strong password.
  1. Start the SSR server:
bash run.sh

Step 5: Open Firewall Ports

Allow traffic on the necessary ports for your proxy server:

sudo ufw allow 1080/tcp
sudo ufw allow 8388/tcp
sudo ufw enable

Step 6: Test Your Proxy Server

  1. Download and install a V2Ray or SSR client on your device.
  2. Configure the client with the server details, including IP address, port, and UUID or password.
  3. Connect to the proxy server and verify your connection.

Conclusion

Setting up V2Ray or ShadowsocksR on a VPS from Hosteons enhances your online privacy and allows you to bypass internet restrictions. With this guide, you can deploy your own secure and private proxy server in minutes. If you encounter any issues, Hosteons’ support team is available to assist you.

How to Set Up OpenLiteSpeed, PHP, and MySQL on Your VPS

OpenLitespeed Tutorial

OpenLiteSpeed is a high-performance, lightweight web server that’s perfect for hosting websites or applications. Combined with PHP and MySQL, it provides an efficient and reliable stack for serving dynamic content. This guide will walk you through setting up OpenLiteSpeed, PHP, and MySQL on your VPS.

Prerequisites

Before starting, ensure you have:

  1. A VPS: A reliable VPS provider like Hosteons.
  2. Linux OS: Ubuntu 20.04 or Debian 11 (minor adjustments may be needed for other distributions).
  3. Root Access: Administrative privileges on your VPS.

Step 1: Update Your Server

Begin by updating your system to ensure all software is up-to-date:

sudo apt update && sudo apt upgrade -y

Step 2: Install OpenLiteSpeed

  1. Add the OpenLiteSpeed repository:
sudo wget -O - https://repo.litespeed.sh | sudo bash
  1. Install OpenLiteSpeed:
sudo apt install openlitespeed -y
  1. Start OpenLiteSpeed and enable it to run at boot:
sudo systemctl start lsws
sudo systemctl enable lsws
  1. Access the OpenLiteSpeed WebAdmin interface at http://your_server_ip:7080. The default username is admin, and the password can be set with:
sudo /usr/local/lsws/admin/misc/admpass.sh

Step 3: Install MySQL

MySQL is required for managing databases. Install it with:

sudo apt install mysql-server -y

Secure the installation:

sudo mysql_secure_installation

Follow the prompts to set a root password and enhance security settings.


Step 4: Install PHP

OpenLiteSpeed works seamlessly with PHP. To install and configure PHP:

  1. Install PHP and necessary extensions:
sudo apt install lsphp81 lsphp81-mysql -y
  1. Configure OpenLiteSpeed to use PHP:
  • Log in to the WebAdmin panel (http://your_server_ip:7080).
  • Navigate to Server Configuration > External App.
  • Click Add to create a new external application with the following settings:
    • Name: lsphp81
    • Address: uds://tmp/lshttpd/lsphp81.sock
    • Max Connections: 35
    • Environment: PHP_LSAPI_CHILDREN=35
    • Command: /usr/local/lsws/lsphp81/bin/lsphp
  • Save the changes.
  1. Map the external application to your virtual host:
  • Go to Virtual Hosts > Context.
  • Add a new context:
    • Type: CGI
    • URI: /*
    • Handler Name: lsphp81
  • Save and restart OpenLiteSpeed.

Step 5: Test PHP

To confirm PHP is correctly configured:

  1. Create a test PHP file:
echo '<?php phpinfo(); ?>' | sudo tee /usr/local/lsws/Example/html/info.php
  1. Visit http://your_server_ip/info.php in a web browser. You should see the PHP information page.

Step 6: Secure Your Server

  1. Remove the PHP Info File: After testing, delete the PHP info file:
sudo rm /usr/local/lsws/Example/html/info.php
  1. Set Up a Firewall: Allow only necessary ports (HTTP, HTTPS, and OpenLiteSpeed WebAdmin):
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow 7080
sudo ufw enable
  1. Enable SSL: Secure your site with Let’s Encrypt:
sudo apt install certbot
sudo certbot certonly --webroot -w /usr/local/lsws/Example/html -d your_domain

Configure SSL in the WebAdmin panel under Listeners > SSL.


Conclusion

You now have a fully functional OpenLiteSpeed, PHP, and MySQL stack set up on your VPS. This setup provides a fast and efficient environment for hosting websites or applications. Hosteons’ reliable VPS solutions are perfect for deploying this powerful combination, ensuring optimal performance and support for your hosting needs.

How to Set Up Nginx, PHP, and MySQL on a VPS

If you’re looking to host a website or web application, setting up a reliable server stack is essential. Nginx, PHP, and MySQL provide a powerful combination for serving dynamic content efficiently. This guide will walk you through setting up Nginx, PHP, and MySQL on a Linux VPS from scratch.

Prerequisites

Before starting, ensure you have:

  1. A VPS: A reliable VPS provider like Hosteons.
  2. Linux OS: Ubuntu 20.04 or Debian 11 (other distributions may require slight adjustments).
  3. Root Access: Administrative privileges on your server.

Step 1: Update Your Server

To ensure you have the latest packages and security patches, update your system:

sudo apt update && sudo apt upgrade -y

Step 2: Install Nginx

Nginx is a lightweight, high-performance web server. Install it with the following command:

sudo apt install nginx -y

After installation, start and enable Nginx to run at boot:

sudo systemctl start nginx
sudo systemctl enable nginx

You can check if Nginx is running by visiting your server’s IP address in a web browser. You should see the default Nginx welcome page.

Step 3: Install MySQL

MySQL is a popular relational database management system used for storing application data. Install it using:

sudo apt install mysql-server -y

Once installed, secure the MySQL installation by running:

sudo mysql_secure_installation

Follow the prompts to set a root password, remove test databases, and disallow remote root logins for added security.

Step 4: Install PHP

PHP is a server-side scripting language used for dynamic web content. To install PHP along with necessary extensions, run:

sudo apt install php-fpm php-mysql -y

Step 5: Configure Nginx to Use PHP

By default, Nginx does not process PHP files. You need to configure Nginx to pass PHP requests to the PHP processor.

  1. Open the default Nginx server block configuration:
sudo nano /etc/nginx/sites-available/default
  1. Modify the file to include the following settings:
server {
    listen 80;
    server_name your_domain_or_IP;
    root /var/www/html;

    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}
  1. Save and exit the file, then test the Nginx configuration:
sudo nginx -t
  1. Reload Nginx to apply the changes:
sudo systemctl reload nginx

Step 6: Test PHP

Create a test PHP file to ensure everything is working:

sudo nano /var/www/html/info.php

Add the following content:

<?php
phpinfo();
?>

Save and exit the file. Visit http://your_server_ip/info.php in your web browser. If PHP is correctly configured, you will see a PHP information page.

Step 7: Secure Your Setup

  1. Remove the PHP Info File: Once you confirm PHP is working, delete the info.php file to prevent unauthorized access:
sudo rm /var/www/html/info.php
  1. Set Up a Firewall: Allow HTTP and HTTPS traffic while blocking unused ports:
sudo ufw allow 'Nginx Full'
sudo ufw enable
  1. Enable SSL: Secure your site with HTTPS using a tool like Let’s Encrypt:
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d your_domain

Follow the prompts to set up SSL certificates.

Conclusion

You now have a fully functional server running Nginx, PHP, and MySQL, ready to host your website or application. This stack provides a robust, secure, and efficient foundation for your web hosting needs. If you’re using Hosteons’ VPS, you can take advantage of their reliable performance and support to ensure your setup runs smoothly.