Error - renew SSL certificate whith certbot

Please show this file:

3 Likes
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/trunk/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

# First Virtual Host must be a shallow duplicate of the main host
# in httpd.conf
<VirtualHost _default_:80>
    <Directory "C:/laragon/www/">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost _default_:8282>
    <Directory "C:/laragon/www/">
        AllowOverride All
        Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile      C:/laragon/etc/ssl/laragon.crt
    SSLCertificateKeyFile   C:/laragon/etc/ssl/laragon.key
</VirtualHost>

That file is a complete mess!

  • It has NO DocumentRoot setting.
3 Likes

I dont know about servers, i like front and backend, but an production app its having problems and i need to run it again

how can i fix it? do you know??

Add this line to that vhost:
DocumentRoot C:/laragon/www/apiapolo2021/public
Like:

<VirtualHost _default_:80>
    DocumentRoot "C:/laragon/www/apiapolo2021/public"
    <Directory "C:/laragon/www/">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

The reason is to match what is being looked for:

3 Likes

but i have another file named auto.apiapolo2021.test.conf

it contains this:

define ROOT "C:/laragon/www/apiapolo2021/public/"
define SITE "apiapolo2021.test"

<VirtualHost *:80> 
    DocumentRoot "${ROOT}"
    ServerName ${SITE}
    ServerAlias *.${SITE}
    <Directory "${ROOT}">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:8282>
    DocumentRoot "${ROOT}"
    ServerName ${SITE}
    ServerAlias *.${SITE}
    <Directory "${ROOT}">
        AllowOverride All
        Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile      C:/laragon/etc/ssl/laragon.crt
    SSLCertificateKeyFile   C:/laragon/etc/ssl/laragon.key
 
</VirtualHost>

As shown by:

There is no "642f07948b0f.sn.mynetname.net" anywhere in that output.

The _default_ would be used to serve from when a name is not matched:

That is why I asked for you to edit that file.

2 Likes

oka, i understand, im going to change that

1 Like

i put that in the C:/laragon/etc/apache2/sites-enabled/00-default.conf, it look like:

<VirtualHost _default_:80>
    <Directory "C:/laragon/www/">
	    DocumentRoot "C:/laragon/www/apiapolo2021/public"
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost _default_:8282>
    <Directory "C:/laragon/www/">
        AllowOverride All
        Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile      C:/laragon/etc/ssl/laragon.crt
    SSLCertificateKeyFile   C:/laragon/etc/ssl/laragon.key
</VirtualHost>

so, can you tell me , whats the next step?
and, thanks, really

That was NOT what I wrote:

4 Likes

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