Publish Web Server in Linux using SSL/TLS

Estimated reading: 2 minutes 32 views

1. Install XAMPP and start services (Skip if not needed)

  • Install a Web Server Stack
    Download and install a web server bundle like XAMPP or WampServer. These packages include Apache (web server), PHP (scripting language), and MySQL (database).

  • Start the Server Services
    Launch the XAMPP/WAMP control panel and start the Apache and MySQL services.

  • Place Your Website Files

    • Navigate to the htdocs folder (for XAMPP) or www folder (for WAMP).

    • Copy your website files (e.g., index.html, index.php) into this folder.

  • Access Your Website Locally
    Open a browser and go to:

    http://localhost

2. Create VPN Account

  • Select the Website menu.
  • In the Website list, click Action then click View.
  • Select VPN Account tab then click Add VPN Account to create new VPN Account.
  • Input username and password then click Save.
  • VPN Account successfully created.

3. Add Root Domain or Subdomain

  • Select the Subdomain tab, then click Add Subdomain to create new Subdomain.
  • Add subdomain, example use @ for root domain then select VPN Account, local scheme and local port (example use 80 for default http port) then click Save.

  • Root domain or subdomain successfully created.

4. Generate SSL Certificate

  • In the Certificate tab, click Add Certificate to create a new certificate.
  • Select SSL Certificate Mode to generate and choose the Subdomain for which the certificate will be created. Then click Add Certificate.

    *Sometimes propagation takes time for the certificate generation to succeed
  • New SSL/TLS Certificate successfully created.

3. Connecting VPN Account

We recommend using WireGuard on Ubuntu to connect to your VPN account:

  • Install WireGuard using this link.
  • WireGuard Installation Guide for Linux
  • In the VPN Accounts tab, click Action and then click Config/Script.
  • WireGuard configuration example
  • Select Wireguard config type then click copy icon to copy config text.
  • WireGuard configuration example
  • Create a WireGuard config file:
  • sudo nano /etc/wireguard/wg0.conf

    Paste your copied configuration inside this file, then press Ctrl + O to save and Ctrl + X to exit.

    WireGuard configuration example
    • Start the VPN connection and enable auto start:
    sudo wg-quick up wg0 && sudo systemctl enable wg-quick@wg0

6. Accessing Domain / Subdomain

  • In the Subdomain tab, copy domain / subdomain which status is online
  • Access domain or subdomain using browser

Leave a Comment

Share this Doc

Publish Web Server in Linux using SSL/TLS

Or copy link

CONTENTS