Flask setup using SSL and subdomain on Ubuntu server

I’m am new to Flask and trying to set up a flask webpage on the subdomain https://ohl.bhelpful.net. I have another webpage running on https://bhelpful.net that has nothing to do with this flask app.

When I enter “service apache2 reload” and try to go on https://ohl.bhelpful.net it just gives me this:
Error when trying to view webpage

The main website (just a plain HTML) on https://bhelpful.net looks like this:

Image of main website working

My config file looks like this:

/etc/apache2/sites-available/default-ssl.conf:

Listen 443
<IfModule mod_ssl.c>

        <VirtualHost *:443>

                ServerAdmin webmaster@localhost

                DocumentRoot "/home/bhelpful/html"
                ServerName bhelpful.net
                ServerAlias www.bhelpful.net

                SSLEngine on
                SSLCertificateFile "/etc/ssl/bhelpful_net.crt"
                SSLCertificateKeyFile "/etc/ssl/private/bhelpful_net.key"

        </VirtualHost>

        <VirtualHost *:443>

                ServerAdmin webmaster@localhost
                ServerName ohl.bhelpful.net
                WSGIScriptAlias / /home/ohl/ohl.wsgi
                <Directory /home/ohl/Online-Help-List/app/>
                        Order allow,deny
                        Allow from all
                </Directory>

                Alias /static /home/ohl/Online-Help-List/app/static/
                <Directory /home/ohl/Online-Help-List/app/static/>
                        Order allow,deny
                        Allow from all
                </Directory>

                ErrorLog ${APACHE_LOG_DIR}/FlaskApp-error.log
                LogLevel warn
                CustomLog ${APACHE_LOG_DIR}/FlaskApp-access.log combined

                SSLEngine on
                SSLCertificateFile "/etc/ssl/bhelpful_net.crt"
                SSLCertificateKeyFile "/etc/ssl/private/bhelpful_net.key"

        </VirtualHost>

</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

The WSGI file looks like this:

/home/ohl/ohl.wsgi

#!/usr/bin/python3.8
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/home/ohl/Online-Help-List")

from app.help_me import app as application

The main flask file lays here:
/home/ohl/Online-Help-List/app/help_me.py

Treeview of files and folders

Go to Source
Author: Andreas G.D Petersen

Login names between sub domains in Active Directory

If I create two subdomains (sub1.domain.com and sub2.domain.com) to my parent domain (domain.com) can different users have the same login in the different subdomains? Or does logins need to be different across the forest.

  • jsmith@domain.com
  • jsmith@sub1.domain.com
  • jsmith@sub2.domain.com

Is this perfectly fine or will sub 1 and 2 conflict with the parent domain. Or will all 3 conflict with eachother?

Go to Source
Author: GSerrano