My two domain
i want second domain to point at In My /var/www/html
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aditya</title>
<style>
.main {
display: table;
}
strong {
color: black;
}
h1 {
color: white;
font-family: Arial, Helvetica, sans-serif;
}
body {
background-color: tomato;
}
a {
text-decoration: none;
}
</style>
</head>
<body>
<div class="main">
<div class="heading">
<h1>Hello!, It's Aditya <strong><a href="https://t.me/lazycoderalways">Contact Me</a></strong></h1>
</div>
</div>
</body>
</html>
I want my first domain to point at in my flask app /var/www/telegram_bot mybot.wsgi
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/telegram_bot/")
from telegram_bot import app as application
application.secret_key = 'Add your secret key'
my telegram_bot.conf
<VirtualHost *:80>
ServerName aditya...ts.xyz
ServerAlias www.aditya...ts.xyz
ServerAdmin admin@mywebsite.com
WSGIScriptAlias / /var/www/telegram_bot/mybot.wsgi
<Directory /var/www/telegram_bot/telegram_bot/>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/telegram_bot/telegram_bot/static
<Directory /var/www/telegram_bot/telegram_bot/static/>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I have already enable conf
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hello,
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
.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.