Skip to content
TheChatArchiveThe Chat Archive
gpt-4-0314· OpenAIAi2 WildChat-4.8M (AI2)

Write a step by step, detailed and specific guide on how I would self host a Coming Soon…

  1. User

    Write a step by step, detailed and specific guide on how I would self host a Coming Soon page with a modern, slick design on my own Linux device. I want to use the domain 'leo.kritica.xyz', and I want to use Cloudflare for performance, protection and general DNS. Include full code. By following the guide I should have a complete version of what I asked for.

  2. Assistant

    Step 1: Prerequisites Before getting started, ensure that you have the following prerequisites on your Linux device:

    1. Terminal access with sudo privileges
    2. An active domain (example: leo.kritica.xyz)
    3. Nginx installed (any other web server will also work if you're comfortable with their configuration)
    4. A text editor (e.g., nano, vim, or any other text editor of your choice)
    5. A Cloudflare account

    Step 2: Setup DNS in Cloudflare

    1. Log in to your Cloudflare account.
    2. Click on Add a Site and enter your domain "kritica.xyz".
    3. Follow the instructions to set up Cloudflare for your domain by updating the nameservers.
    4. Once the DNS is propagated, go to the DNS tab.
    5. Add an A record to point "leo" to the public IP address of your Linux device.

    Step 3: Install Basic HTML & CSS for a Coming Soon Page

    1. Create a new directory for your web page:
    sudo mkdir -p /var/www/html/leo
    
    1. Create an "index.html" file:
    sudo nano /var/www/html/leo/index.html
    
    1. Paste the following HTML code into the "index.html" file:
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="style.css">
        <title>Coming Soon</title>
    </head>
    <body>
        <div class="container">
            <h1>Coming Soon</h1>
            <p>Our website is under construction. Please check back soon!</p>
        </div>
    </body>
    </html>
    
    1. Save and close the file.

    2. Create a "style.css" file:

    sudo nano /var/www/html/leo/style.css
    
    1. Paste the following CSS code into the "style.css" file:
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    body {
        font-family: Arial, sans-serif;
        background-color: #f5f5f5;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    
    .container {
        background-color: #ffffff;
        border-radius: 12px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        padding: 40px;
        text-align: center;
    }
    
    h1 {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    p {
        font-size: 18px;
        line-height: 1.4;
    }
    
    1. Save and close the file.

    Step 4: Create Nginx Configuration for your Domain

    1. Create a new Nginx configuration file:
    sudo nano /etc/nginx/sites-available/leo
    
    1. Paste the below Nginx configuration into the file, changing the "server_name" to your domain:
    server {
       listen 80;
       server_name leo.kritica.xyz;
    
       root /var/www/html/leo;
       index index.html;
       
       location / {
           try_files $uri $uri/ =404;
       }
    }
    
    1. Save and close the file.

    2. Create a symbolic link for the configuration file:

    sudo ln -s /etc/nginx/sites-available/leo /etc/nginx/sites-enabled/
    
    1. Test the Nginx configuration:
    sudo nginx -t
    
    1. Restart Nginx to apply the changes:
    sudo systemctl restart nginx
    

    Step 5: Enable HTTPS with SSL/TLS

    1. Install Certbot and the Nginx plugin:
    sudo apt install certbot python3-certbot-nginx
    
    1. Run Certbot to obtain and install a certificate:
    sudo certbot --nginx
    
    • Select the "leo.kritica.xyz" domain when prompted.
    • Choose whether or not to redirect all traffic to HTTPS. We recommend choosing option 2 to redirect.

    Step 6: Update Cloudflare SSL/TLS settings

    1. Log in to your Cloudflare account and go to the "SSL/TLS" tab.
    2. Under "Encryption mode", select "Full (strict)".

    That's it! Now you should have a self-hosted coming soon page on your Linux device with a modern, slick design, using the "leo.kritica.xyz" domain and Cloudflare for performance, protection, and general DNS.