Error while running apache2ctl configtest but configtest is ok


#1

when i executed manulally apache2ctl configtest, I got:

Syntax OK

but when I try configurate certificate, i receive error:

my command:

sudo certbot --apache -d authresources.com -d www.authresources.com -d forums.authresources.com

Output:

(...)
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.

AH00526: Syntax error on line 20 of /etc/apache2/sites-enabled/000-default.conf:
Name duplicates previous WSGI daemon definition.

Rolling back to previous server configuration...
(...)

My server: Apache/2.4.18 , Ubuntu 16.04.1 LTS

My config files:

000-default.conf:

<VirtualHost *:80>
        ServerAdmin elizabeth@rape.lol
        ServerName authresources.com
        ServerAlias www.authresources.com

	Alias /static /root/myproject/mysite/static
        <Directory /root/myproject/mysite/static>
           Require all granted
        </Directory>

        <Directory /root/myproject/mysite/mysite>
           <Files wsgi.py>
               Require all granted
           </Files>
        </Directory>
        
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

        WSGIDaemonProcess mysite python-home=/root/myproject/myprojectenv python-path=/root/myproject/mysite
        WSGIProcessGroup mysite
        WSGIScriptAlias / /root/myproject/mysite/mysite/wsgi.py
</VirtualHost>

mybb.conf:

<VirtualHost *:80>
ServerAdmin elizabeth@rape.lol
DocumentRoot /var/www/forums/mybb/
ServerName authresources.com
ServerAlias forums.authresources.com
<Directory /var/www/forums/mybb/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/errorMyBB.log
CustomLog ${APACHE_LOG_DIR}/accessMyBB.log combined
</VirtualHost>

#2

I resolved this problem by comment line:

WSGIDaemonProcess mysite python-home=/root/myproject/myprojectenv python-path=/root/myproject/mysite

during execute certbot


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.