I'm new to Apache2, so bear with me.
I followed this tutorial to get HTTPS working with a Flask server.
I keep getting the same output when I run the apache2
command:
[Wed Nov 28 01:42:32.210442 2018] [core:warn] [pid 1184] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Wed Nov 28 01:42:32.210921 2018] [core:warn] [pid 1184] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Wed Nov 28 01:42:32.211029 2018] [core:warn] [pid 1184] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Wed Nov 28 01:42:32.211138 2018] [core:warn] [pid 1184] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Nov 28 01:42:32.219990 2018] [core:warn] [pid 1184:tid 139772922629056] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
[Wed Nov 28 01:42:32.220662 2018] [core:warn] [pid 1184:tid 139772922629056] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Nov 28 01:42:32.221009 2018] [core:warn] [pid 1184:tid 139772922629056] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Nov 28 01:42:32.221106 2018] [core:warn] [pid 1184:tid 139772922629056] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Nov 28 01:42:32.221304 2018] [core:warn] [pid 1184:tid 139772922629056] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Nov 28 01:42:32.221421 2018] [core:warn] [pid 1184:tid 139772922629056] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Nov 28 01:42:32.221710 2018] [core:warn] [pid 1184:tid 139772922629056] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Nov 28 01:42:32.221808 2018] [core:warn] [pid 1184:tid 139772922629056] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00543: apache2: bad user name ${APACHE_RUN_USER}
I've tried multiple other StackOverflow, AskUbuntu, and ServerFault questions, and none of them have helped. I'm stuck and I don't know what to do. I will edit the question to what is needed from other people (such as code or something from a conf file)
Any and all help is appreciated.
EDIT: I went to the unsecure (not-https) IP and I got the generic Apache "It works!" page. If I go to the secure (https) domain, I get a 500 Internal Server Error.
EDIT2: Here is my current VirtualHost file:
<VirtualHost *:80>
ServerName xerix.me
ServerAlias www.xerix.me
ServerAdmin [email protected]
WSGIScriptAlias / /var/www/cf/cf.wsgi
<Directory /var/www/cf/cf/>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/cf/cf/static
<Directory /var/www/cf/cf/static/>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =xerix.me [OR]
RewriteCond %{SERVER_NAME} =www.xerix.me
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
EDIT3:
Nov 28 01:50:34 xerix systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit apache2.service has begun starting up.
Nov 28 01:50:34 xerix systemd[1]: Started The Apache HTTP Server.
-- Subject: Unit apache2.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit apache2.service has finished starting up.
--
-- The start-up result is RESULT.
EDIT4:
[Wed Nov 28 02:43:15.319965 2018] [wsgi:error] [pid 2078:tid 139635571181312] [client :40218] Traceback (most recent call last):, referer: https://xerix.me/
[Wed Nov 28 02:43:15.320002 2018] [wsgi:error] [pid 2078:tid 139635571181312] [client :40218] File "/var/www/cf/cf.wsgi", line 7, in <module>, referer: https://xerix.me/
[Wed Nov 28 02:43:15.320215 2018] [wsgi:error] [pid 2078:tid 139635571181312] [client :40218] from cf import app as application, referer: https://xerix.me/
[Wed Nov 28 02:43:15.320252 2018] [wsgi:error] [pid 2078:tid 139635571181312] [client :40218] ImportError: cannot import name app, referer: https://xerix.me/
Thanks!