Переменные конфигурации Apache2 не определены

Я новичок в Apache2, так что терпите.

Я следовал этому руководству, чтобы настроить HTTPS на работу с сервером Flask.

Я получаю тот же результат, когда запускаю команду apache2 :

[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}

Я пробовал несколько других вопросов StackOverflow, AskUbuntu и ServerFault, и ни один из них не помог. Я застрял и не знаю, что делать. Я отредактирую вопрос, указав, что требуется от других людей (например, код или что-то из файла conf)

Любая помощь приветствуется.

РЕДАКТИРОВАТЬ: Я перешел на небезопасный (не https) IP и получил общий Apache "Это работает!" страница. Если я перейду в защищенный (https) домен, я получаю внутреннюю ошибку сервера 500.

EDIT2: Вот мой текущий файл VirtualHost:

<VirtualHost *:80>
 ServerName xerix.me
 ServerAlias www.xerix.me
 ServerAdmin admin@xerix.me
 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/

Спасибо!

2
задан 28 November 2018 в 06:15

0 ответов

Другие вопросы по тегам:

Похожие вопросы: