Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Why is there an error in /etc/httpd/conf.d/php.conf?
I'm trying to install certbot . But an error occurs on the 6th line of the php.conf file:
[[email protected] ~]# certbot
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Certbot doesn't know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run "certbot certonly" to do so. You'll need to manually configure your web server to use the resulting certificate.
[[email protected] ~]# cat /var/log/letsencrypt/letsencrypt.log
2020-08-29 10:40:30,891:DEBUG:certbot._internal.main:certbot version: 1.6.0
2020-08-29 10:40:30,891:DEBUG:certbot._internal.main:Arguments: []
2020-08-29 10:40:30,891:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-08-29 10:40:30,938:DEBUG:certbot._internal.log:Root logging level set at 20
2020-08-29 10:40:30,938:INFO:certbot._internal.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-08-29 10:40:30,939:DEBUG:certbot._internal.plugins.selection:Requested authenticator None and installer None
2020-08-29 10:40:31,064:DEBUG:certbot_apache._internal.configurator:Apache version is 2.4.6
2020-08-29 10:40:31,487:DEBUG:certbot._internal.plugins.disco:Other error:(PluginEntryPoint#apache): There has been an error in parsing the file /etc/httpd/conf.d/php.conf on line 6: Syntax error
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/certbot/_internal/plugins/disco.py", line 136, in prepare
self._initialized.prepare()
File "/usr/lib/python2.7/site-packages/certbot_apache/_internal/configurator.py", line 347, in prepare
self.parser.check_parsing_errors("httpd.aug")
File "/usr/lib/python2.7/site-packages/certbot_apache/_internal/parser.py", line 130, in check_parsing_errors
raise errors.PluginError(msg)
PluginError: There has been an error in parsing the file /etc/httpd/conf.d/php.conf on line 6: Syntax error
2020-08-29 10:40:31,488:DEBUG:certbot._internal.plugins.selection:No candidate plugin
2020-08-29 10:40:31,489:DEBUG:certbot._internal.plugins.selection:Selected authenticator None and installer None
#
# The following lines prevent .user.ini files from being viewed by Web clients.
#
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers> 5
MaxSpareServers> 5
MaxRequestWorkers 100
MaxConnectionsPerChild 300
</IfModule>
<Files ".user.ini">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
</Files>
#
# Allow php to handle Multiviews
#
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
# mod_php options
<IfModule mod_php7.c>
#
# Cause the PHP interpreter to handle files with a .php extension.
#
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
#
# Uncomment the following lines to allow PHP to pretty-print .phps
# files as PHP source code:
#
#<FilesMatch \.phps$>
# SetHandler application/x-httpd-php-source
#</FilesMatch>
#
# Apache specific PHP configuration options
# those can be override in each configured vhost
#
php_value session.save_handler "files"
php_value session.save_path "/var/lib/php/mod_php/session"
php_value soap.wsdl_cache_dir "/var/lib/php/mod_php/wsdlcache"
#php_value opcache.file_cache "/var/lib/php/mod_php/opcache"
</IfModule>
Answer the question
In order to leave comments, you need to log in
Installed according to this instruction, it immediately worked https://www.tecmint.com/setup-free-ssl-certificate...
If possible, reinstall the web server.
What version of Apache?
https://www.hostcms.ru/documentation/server/apache...
Пример конфигурации для Apache 2.4
<IfModule mpm_prefork_module>
ServerLimit 256
StartServers 20
MinSpareServers 20
MaxSpareServers 20
MaxRequestWorkers 256
MaxConnectionsPerChild 4000
</IfModule>
MaxRequestWorkers установите значением, равным ServerLimit.
Пример конфигурации для Apache 2
В секции <IfModule [мультипроцессорный модуль]>, например, <IfModule prefork.c> установим следующие значения:
StartServers 5
MinSpareServers 10
MaxSpareServers 10
MaxClients 30
ServerLimit 30
StartServers — количество запускаемых процессов, рассчитываете как (Всего памяти - Память для сервера, MySQL, Memcache и т.д.) / размер процесса. Например, 64Gb - 32Gb / 0.256Gb = максимум 125 процессов.
MinSpareServers — минимальное количество простаивающих процессов.
MaxSpareServers — максимальное количество простаивающих процессов.
MaxClients — лимит процессов.
ServerLimit — устанавливается аналогичным значению MaxClients.
Обстоятельно необходимо подходить к расчету MaxClients, т.к. при установке малого значения может увеличиться количество отказов вэб-сервера в обслуживании на запрос клиента. Установка слишком большого значения может привести к свопингу и значительному увеличению времени ответа вэб-сервера.
При использовании одноуровневой и двухуровневой конфигурации вtб-сервера лимиты устанавливаются по-разному. Отдавая сформированные страницы более легкому вtб-серверу (например, nginx), лимиты можно понизить. Конкретные значения рассчитываются индивидуально для каждого вэб-сервера.
On favicon.by - on the right in the corner there are the latest Yandex updates on favicons - as a rule, after a couple of such updates, the favicon will be in the search results
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question