Failed to create Apache config file

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: CubeHosting.eu

I ran this command:certbot --apache

It produced this output:

Keeping the existing certificate
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
An unexpected error occurred:
ValueError: Unable to set value to path!
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version): Apache/2.4.29 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 18.04

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0

Hi @Tutorialwork

are there more details?

What says

apachectl -S

PS: Your http + www works, http + non-www has a 503, https works, but with the wrong certificate:

CN=panel.cubehosting.eu
	06.04.2019
	05.07.2019
expires in 89 days	panel.cubehosting.eu - 1 entry

Perhaps your http + non-www is wrong, so Certbot used these informations -> and crashed. So first fix your http + non-www.

Here is the logfile: https://pastebin.com/yXWtjb3Q

apachectl -S says:

AH00112: Warning: DocumentRoot [/var/www/html/admin] does not exist
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using vmd29009.contaboserver.net. Set the ‘ServerName’ directive globally to suppress this message
VirtualHost configuration:
*:443 panel.cubehosting.eu (/etc/apache2/sites-enabled/pterodactyl-le-ssl.conf:2)
*:80 is a NameVirtualHost
default server cubehosting.eu (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost cubehosting.eu (/etc/apache2/sites-enabled/000-default.conf:1)
alias www.cubehosting.eu
port 80 namevhost acp.cubehosting.eu (/etc/apache2/sites-enabled/000-default.conf:31)
port 80 namevhost forum.cubehosting.eu (/etc/apache2/sites-enabled/000-default.conf:63)
port 80 namevhost rewards.cubehosting.eu (/etc/apache2/sites-enabled/000-default.conf:97)
port 80 namevhost panel.cubehosting.eu (/etc/apache2/sites-enabled/pterodactyl.conf:1)
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=“www-data” id=33
Group: name=“www-data” id=33

There you have your problem. Certbot reports the same. Change that wrong entry.

Every combination of port + servername should be unique. Change the name of your default server.

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