I want to use /etc/httpd/conf/httpd.conf for 443 vhosts.
So I have editted “certbot/certbot-apache/certbot_apache/constants.py”
Default
CLI_DEFAULTS_CENTOS = dict(
server_root="/etc/httpd",
vhost_root="/etc/httpd/conf.d",
vhost_files="*.conf",
version_cmd=[‘apachectl’, ‘-v’],
define_cmd=[‘apachectl’, ‘-t’, ‘-D’, ‘DUMP_RUN_CFG’],
restart_cmd=[‘apachectl’, ‘graceful’],
conftest_cmd=[‘apachectl’, ‘configtest’],
enmod=None,
dismod=None,
le_vhost_ext="-le-ssl.conf",
handle_mods=False,
handle_sites=False,
challenge_location="/etc/httpd/conf.d", ““
challenge_location=”/etc/httpd”,
MOD_SSL_CONF_SRC=pkg_resources.resource_filename(
“certbot_apache”, “centos-options-ssl-apache.conf”)
)
Editted
CLI_DEFAULTS_CENTOS = dict(
server_root="/etc/httpd",
vhost_root="/etc/httpd/conf",
vhost_files=“httpd.conf”,
version_cmd=[‘apachectl’, ‘-v’],
define_cmd=[‘apachectl’, ‘-t’, ‘-D’, ‘DUMP_RUN_CFG’],
restart_cmd=[‘apachectl’, ‘graceful’],
conftest_cmd=[‘apachectl’, ‘configtest’],
enmod=None,
dismod=None,
le_vhost_ext="-le-ssl.conf",
handle_mods=False,
handle_sites=False,
challenge_location="/etc/httpd",
MOD_SSL_CONF_SRC=pkg_resources.resource_filename(
“certbot_apache”, “centos-options-ssl-apache.conf”)
)
But I got following error.
“2016-08-08 15:07:39,226:ERROR:certbot_apache.configurator:No vhost exists with servername or alias of: xxxxx.xxx. No vhost was selected. Please specify servernames in the Apache config”