I have two domain i want to point one to html page & second to flask my case both domain is pointing toward html page

Posted November 17, 2021 45 views
UbuntuApachePythonPython Frameworks

My two domain
1) aditya…

i want second domain to point at
In My /var/www/html


<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        .main {
            display: table;
        strong {
            color: black;
        h1 {
            color: white;
            font-family: Arial, Helvetica, sans-serif;
        body {
            background-color: tomato;
        a {
            text-decoration: none;
    <div class="main">
        <div class="heading">
            <h1>Hello!, It's Aditya <strong><a href="">Contact Me</a></strong></h1>

I want my first domain to point at
in my flask app /var/www/telegram_bot

import sys
import logging

from telegram_bot import app as application
application.secret_key = 'Add your secret key'

my telegram_bot.conf

<VirtualHost *:80>
        WSGIScriptAlias / /var/www/telegram_bot/mybot.wsgi
        <Directory /var/www/telegram_bot/telegram_bot/>
            Order allow,deny
            Allow from all
        Alias /static /var/www/telegram_bot/telegram_bot/static
        <Directory /var/www/telegram_bot/telegram_bot/static/>
            Order allow,deny
            Allow from all
        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined

I have already enable conf

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


Is it the Flask application that is not loading correctly? If so, do you have the wsgi Apache module enabled?

If not, you can install it by running the following:

sudo apt-get install libapache2-mod-wsgi python-dev

To enable mod_wsgi, run the following command:

sudo a2enmod wsgi 

I could suggest checking your Apache error log to see if there are any errors that could point you in the right direction:

  • sudo tail -100 /var/log/apache2/error.log

Also could you share the Apache Vhost for the domain that should point to /var/www/html.