我在我的服务器上使用2个域,并希望为1域启用certbot。
我从certbot得到这个错误:
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...
。
我的第一个域的apache2configuration(没有SLL)
<VirtualHost *:80> ServerName 1domain.de ServerAlias 1domain.de www.1domain.de ServerAdmin [email protected] 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>
。
我的第二个域的apache2configuration(这是一个为certbot):
<VirtualHost *:80> ServerName 2domain.de ServerAlias www.2domain.de ServerAdmin [email protected] 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>
当我重新启动我的Apache,我没有得到任何错误。 但是,让我们encryption的问题是什么? 由于重新定义错误,我find了Apache和多个PHP-FPM池 。解决scheme是将操作重命名为别名,以便重新定义。 但是我的variables在2个configuration中是不一样的。
哪里有问题? 如何解决?
先谢谢你