I got this error from certbot:
- Code: Select all
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.
AH00526: Syntax error on line 44 of /etc/apache2/sites-enabled/2domain.conf:
FastCgiExternalServer: redefinition of previously defined class "/usr/lib/cgi-bin/php7-ssl-fcgi"
Rolling back to previous server configuration...
.
My apache2 config for the first domain (no SLL)
- Code: Select all
<VirtualHost *:80>
ServerName 1domain.de
ServerAlias 1domain.de www.1domain.de
ServerAdmin webmaster@1domain.com
DocumentRoot /var/www/html/magento-ds
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /usr/lib/cgi-bin>
Require all granted
</Directory>
<IfModule mod_fastcgi.c>
AddHandler php7-fcgi .php
Action php7-fcgi /php7-fcgi virtual
Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgii -socket /var/run/php/php7.0-fpm.sock -idle-timeout 1800 -pass-header Authorization
</IfModule>
</VirtualHost>
.
My apache2 config for the second domain (this is the one for the certbot):
- Code: Select all
<VirtualHost *:80>
ServerName 2domain.de
ServerAlias www.2domain.de
ServerAdmin webmaster@2domain.com
DocumentRoot /var/www/html/magento-spielzeug
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /usr/lib/cgi-bin>
Require all granted
</Directory>
<IfModule mod_fastcgi.c>
AddHandler php7-ssl-fcgi .php
Action php7-ssl-fcgi /php7-fcgi virtual
Alias /php7-ssl-fcgi /usr/lib/cgi-bin/php7-ssl-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php7-ssl-fcgi -socket /var/run/php/php7.0o-fpm.sock -pass-header Authorization
</IfModule>
</VirtualHost>
When I restart my apache I dont get any error. But what is the problem with lets-encrypt?
Because of the redefinition error I found https://serverfault.com/questions/439692/apache-and-multiple-php-fpm-pools
The solution there is to rename action an alias to have no redefinitions. But my variables are not the same in the 2 configs.
Where is the problem? How to solve it?
Thank you in advance