Синтаксическая ошибка в строке 26 файла /etc/httpd/conf.d/wsgi.conf: имя дублирует предыдущее определение демона WSGI - PullRequest
0 голосов
/ 23 мая 2019

При установке давайте зашифруем SSL в упругом beanstalk AWS, получаю следующую ошибку.

Были предприняты шаги для установки ssl:

  1. sudo -y установить mod24_ssl
  2. sudo git clone https://github.com/letsencrypt/letsencrypt / opt / letsencrypt
  3. sudo / opt / letsencrypt / letsencrypt-auto --debug -d www.example.com

Ошибка:

Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.example.com
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/httpd/conf.d/wsgi-le-ssl.conf
Deploying Certificate to VirtualHost /etc/httpd/conf.d/wsgi-le-ssl.conf
Error while running apachectl configtest.


[Thu May 23 11:37:20.146374 2019] [so:warn] [pid 26550] AH01574: module wsgi_module is already loaded, skipping
AH00526: Syntax error on line 26 of /etc/httpd/conf.d/wsgi.conf:
Name duplicates previous WSGI daemon definition.

Unable to run the command: systemctl restart httpd
Rolling back to previous server configuration...
Exiting abnormally:
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 11, in <module>
    sys.exit(main())
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1379, in main
    return config.func(config, plugins)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1137, in run
    _install_cert(config, le_client, domains, new_lineage)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 763, in _install_cert
    path_provider.cert_path, path_provider.chain_path, path_provider.fullchain_path)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 520, in deploy_certificate
    self.installer.restart()
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/configurator.py", line 2162, in restart
    self.config_test()
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/override_fedora.py", line 49, in config_test
    self._try_restart_fedora()
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/override_fedora.py", line 64, in _try_restart_fedora
    raise errors.MisconfigurationError(str(err))
MisconfigurationError: Unable to run the command: systemctl restart httpd

wsgi.conf:

LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome /opt/python/run/baselinenv
WSGISocketPrefix run/wsgi
WSGIRestrictEmbedded On

<VirtualHost *:80>

Alias /static/ /opt/python/current/app/static/
<Directory /opt/python/current/app/static/>
Order allow,deny
Allow from all
</Directory>


WSGIScriptAlias / /opt/python/current/app/myapp/wsgi/__init__.py


<Directory /opt/python/current/app/>
  Require all granted
</Directory>

WSGIDaemonProcess wsgi processes=1 threads=15 display-name=%{GROUP} \
  python-home=/opt/python/run/venv/ \
  python-path=/opt/python/current/app user=wsgi group=wsgi \
  home=/opt/python/current/app
WSGIProcessGroup wsgi
</VirtualHost>

LogFormat "%h (%{X-Forwarded-For}i) %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
[ec2-user@ip-xxx ~]$ uname -a
Linux ip-xxx 4.14.109-80.92.amzn1.x86_64 #1 SMP Mon Apr 1 23:07:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

...