Apache ArchLinux Certbot error creating certificate

I have installed:
pacman -S certbot certbot-apache
I have nextcloud on a vhost like this: nextcloud.mydomain.com
I am trying to install TLS on my apache that has this vhost and I get this error:

Created an SSL vhost at /etc/httpd/conf/extra/nextcloud-le-ssl.conf
Cannot find an SSLCertificateFile directive in /files/etc/httpd/conf/extra/nextcloud-le-ssl.conf/IfModule/VirtualHost. VirtualHost was not modified
Unable to find an SSLCertificateFile directive

After this I can't find an /etc/httpd/conf/extra/nextcloud-le-ssl.conf file and my nextcloud.mydomain.com doesn't have TLS.

My apache configuration for this domain is this:

<IfModule mod_alias.c>
    Alias /nextcloud /usr/share/webapps/nextcloud/
</IfModule>

<Directory /usr/share/webapps/nextcloud/>
    Options FollowSymlinks
    AllowOverride all
    Require all granted
    php_admin_value open_basedir "/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/nextcloud/:/etc/webapps/nextcloud"
</Directory>

<VirtualHost *:80>
    ServerAdmin dannysantos1985@gmail.com
    DocumentRoot /usr/share/webapps/nextcloud
    ServerName nextcloud.minho.win
    ErrorLog /var/log/httpd/nextcloud.foo.info-error_log
    CustomLog /var/log/httpd/nextcloud.foo.info-access_log common

    RewriteEngine on
    RewriteCond %{SERVER_NAME} =nextcloud.minho.win
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>

I had to uncomment this in /etc/httpd/conf/httpd.conf:

LoadModule ssl_module modules/mod_ssl.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

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