# Failed redirect

**URL:** <https://community.letsencrypt.org/t/failed-redirect/163099>\
**Category:** Help\
**Created:** [October 14, 2021, 1:18pm UTC](https://community.letsencrypt.org/t/failed-redirect/163099 "2021-10-14T13:18:49Z")\
**Posts on this page:** 16\
**Page:** 3

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 15, 2021, 5:56am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/44 "2021-10-15T05:56:49Z")

</div>

> [@matthewcole805](#):
>
> `The dry run was successful.`

Perfect!  
Now do you want certbot to create the HTTPS vhost for you?  
[or do you want to do that yourself?]

---

<div class="post-metadata">

**Author:** ![matthewcole805](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@matthewcole805](https://community.letsencrypt.org/u/matthewcole805)\
**Post date:** [October 15, 2021, 5:58am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/45 "2021-10-15T05:58:04Z")

</div>

I think I want certbot to do that. 🙂

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 15, 2021, 5:58am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/46 "2021-10-15T05:58:48Z")

</div>

Do:

```nohighlight
certbot -i apache \
--webroot -w /var/www/matthewalbertcole.com \
-d matthewalbertcole.com \
-d www.matthewalbertcole.com

```

---

<div class="post-metadata">

**Author:** ![matthewcole805](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@matthewcole805](https://community.letsencrypt.org/u/matthewcole805)\
**Post date:** [October 15, 2021, 6:09am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/47 "2021-10-15T06:09:07Z")

</div>

Back to the same error unfortunately

```nohighlight
Deploying certificate
Successfully deployed certificate for matthewalbertcole.com to /etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf
Successfully deployed certificate for www.matthewalbertcole.com to /etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf
Failed redirect for matthewalbertcole.com
Unable to set the redirect enhancement for matthewalbertcole.com.

NEXT STEPS:
- The certificate was saved, but could not be installed (installer: apache). After fixing the error shown below, try installing it again by running:
  certbot install --cert-name matthewalbertcole.com

Unable to find corresponding HTTP vhost; Unable to create one as intended addresses conflict; Current configuration does not support automated redirection
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

```

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 15, 2021, 6:12am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/48 "2021-10-15T06:12:48Z")

</div>

~~Not exactly.~~

> [@matthewcole805](#):
>
> ```nohighlight
> Successfully deployed certificate for matthewalbertcole.com ...
> Successfully deployed certificate for www.matthewalbertcole.com ...
> 
> ```

Restart `Apache` and enjoy life!

Did it ask you if you wanted redirection?  
If so, we had already done that.

EDIT: I do see how it seems full-circle.  
But not all was wasted...  
We did add the extra name into the cert.  
We did add a cool redirection that takes into account any future HTTP challenge requests.

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 15, 2021, 6:16am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/49 "2021-10-15T06:16:55Z")

</div>

> [@matthewcole805](#):
>
> `Unable to find corresponding HTTP vhost`

That still seems really weird.

---

<div class="post-metadata">

**Author:** ![matthewcole805](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@matthewcole805](https://community.letsencrypt.org/u/matthewcole805)\
**Post date:** [October 15, 2021, 6:17am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/50 "2021-10-15T06:17:28Z")

</div>

ok the website works now! thank you

---

<div class="post-metadata">

**Author:** ![matthewcole805](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@matthewcole805](https://community.letsencrypt.org/u/matthewcole805)\
**Post date:** [October 15, 2021, 6:17am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/51 "2021-10-15T06:17:49Z")

</div>

ya, no idea what that means

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 15, 2021, 6:19am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/52 "2021-10-15T06:19:44Z")

</div>

Now I'm confused...  
There was already an HTTPS vhost configured for BOTH names:

> [@matthewcole805](#):
>
> ```nohighlight
> irtualHost configuration:
> *:443 is a NameVirtualHost
> default server www.matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf:2)
> port 443 namevhost www.matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf:2)
> port 443 namevhost matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf:12)
> 
> ```

**Please show the current output of:**  
`sudo apachectl -t -D DUMP_VHOSTS`

---

<div class="post-metadata">

**Author:** ![matthewcole805](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@matthewcole805](https://community.letsencrypt.org/u/matthewcole805)\
**Post date:** [October 15, 2021, 6:26am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/53 "2021-10-15T06:26:45Z")

</div>

> [@rg305](#):
>
> sudo apachectl -t -D DUMP\_VHOSTS

```nohighlight
root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# sudo apachectl -t -D DUMP_VHOSTS
VirtualHost configuration:
*:443 is a NameVirtualHost
         default server www.matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf:2)
         port 443 namevhost www.matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf:2)
         port 443 namevhost matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf:12)
         port 443 namevhost www.pdxwater.org (/etc/apache2/sites-enabled/pdxwater.org-le-ssl.conf:2)
         port 443 namevhost pdxwater.org (/etc/apache2/sites-enabled/pdxwater.org-le-ssl.conf:12)
*:80 is a NameVirtualHost
         default server matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com.conf:1)
         port 80 namevhost matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com.conf:1)
                 alias www.matthewalbertcole.com
         port 80 namevhost pdxwater.org (/etc/apache2/sites-enabled/pdxwater.org.conf:1)
                 alias www.pdxwater.org

```

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 15, 2021, 6:31am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/54 "2021-10-15T06:31:53Z")

</div>

> [@matthewcole805](#):
>
> ```nohighlight
> port 443 namevhost www.matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf:2)
> port 443 namevhost matthewalbertcole.com (/etc/apache2/sites-enabled/matthewalbertcole.com-le-ssl.conf:12)
> 
> ```

Ok that doesn't seem to have changed.  
**Please show that file.**  
**And the output of:**  
`certbot certificates`

---

<div class="post-metadata">

**Author:** ![matthewcole805](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@matthewcole805](https://community.letsencrypt.org/u/matthewcole805)\
**Post date:** [October 15, 2021, 6:39am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/55 "2021-10-15T06:39:52Z")

</div>

```nohighlight
root@nodejs-s-1vcpu-1gb-nyc3-01:/etc/apache2/sites-enabled# cat matthewalbertcole.com-le-ssl.conf
<IfModule mod_ssl.c>
        <VirtualHost *:443>
                ServerAdmin root@matthewalbertcole.com
                DocumentRoot /var/www/matthewalbertcole.com
		ServerName www.matthewalbertcole.com
		Redirect permanent / https://matthewalbertcole.com
		Include /etc/letsencrypt/options-ssl-apache.conf
		SSLCertificateFile /etc/letsencrypt/live/matthewalbertcole.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/matthewalbertcole.com/privkey.pem
</VirtualHost>

<VirtualHost *:443>

		ServerAdmin root@matthewalbertcole.com
		DocumentRoot /var/www/matthewalbertcole.com
		ServerName matthewalbertcole.com

		<Proxy *>
		 Order deny,allow
		 Allow from all
		</Proxy>
	
		SSLEngine on
		SSLProxyEngine on

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                Include /etc/letsencrypt/options-ssl-apache.conf

		ProxyRequests Off
		ProxyPreserveHost On
		SSLProxyVerify none
		SSLProxyCheckPeerCN off
		SSLProxyCheckPeerName off
		SSLProxyCheckPeerExpire off
		ProxyRequests Off
		ProxyPass / http://localhost:8080/
		ProxyPassReverse / http://localhost:8080/

		Timeout 600
		ProxyTimeout 600
		SetEnv proxy-nokeepalive 1
		SetEnv proxy-initial-not-pooled 1

		SSLCertificateFile /etc/letsencrypt/live/matthewalbertcole.com/fullchain.pem
		SSLCertificateKeyFile /etc/letsencrypt/live/matthewalbertcole.com/privkey.pem
        </VirtualHost>
</IfModule>

```

```nohighlight
root@nodejs-s-1vcpu-1gb-nyc3-01:/etc/apache2/sites-enabled# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: matthewalbertcole.com-0001
    Serial Number: 3764ecefe16ad1dc47dc81a53da3306a2f2
    Key Type: RSA
    Domains: matthewalbertcole.com
    Expiry Date: 2022-01-13 02:05:29+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/matthewalbertcole.com-0001/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/matthewalbertcole.com-0001/privkey.pem
  Certificate Name: matthewalbertcole.com
    Serial Number: 391e35cbfcb66ef4a52886c6e9e3879c49d
    Key Type: RSA
    Domains: matthewalbertcole.com www.matthewalbertcole.com
    Expiry Date: 2022-01-13 05:08:17+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/matthewalbertcole.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/matthewalbertcole.com/privkey.pem
  Certificate Name: pdxwater.org-0001
    Serial Number: 496a9dcb4ebc15ecb2b3e4f556005736f54
    Key Type: RSA
    Domains: pdxwater.org
    Expiry Date: 2021-11-29 08:58:53+00:00 (VALID: 45 days)
    Certificate Path: /etc/letsencrypt/live/pdxwater.org-0001/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/pdxwater.org-0001/privkey.pem
  Certificate Name: pdxwater.org
    Serial Number: 377ed01cda572be801c2562016df54587bc
    Key Type: RSA
    Domains: pdxwater.org www.pdxwater.org
    Expiry Date: 2021-11-29 19:47:10+00:00 (VALID: 45 days)
    Certificate Path: /etc/letsencrypt/live/pdxwater.org/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/pdxwater.org/privkey.pem
  Certificate Name: www.matthewalbertcole.com
    Serial Number: 486ca6f83b043b88476794e8f984f772946
    Key Type: RSA
    Domains: www.matthewalbertcole.com
    Expiry Date: 2022-01-13 02:00:50+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/www.matthewalbertcole.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/www.matthewalbertcole.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

```

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 15, 2021, 6:48am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/56 "2021-10-15T06:48:59Z")

</div>

I don't see much of anything wrong there...  
You can remove the unused cert:  
`cerbot delete --cert-name matthewalbertcole.com-0001`

All should be well now 🙂

---

<div class="post-metadata">

**Author:** ![matthewcole805](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@matthewcole805](https://community.letsencrypt.org/u/matthewcole805)\
**Post date:** [October 15, 2021, 6:55am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/57 "2021-10-15T06:55:36Z")

</div>

> [@rg305](#):
>
> cerbot delete --cert-name matthewalbertcole.com-0001

Thank You for your help. Happy to see it working again!

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 15, 2021, 7:00am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/58 "2021-10-15T07:00:01Z")

</div>

Glad to have helped 🙂  
Cheers from Miami 🍻

#FreeCUBA 🇨🇺

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [November 14, 2021, 7:00am UTC](https://community.letsencrypt.org/t/failed-redirect/163099/59 "2021-11-14T07:00:33Z")

</div>

Closed on November 14, 2021, 7:00am UTC

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

[Previous page](https://community.letsencrypt.org/t/failed-redirect/163099.md?page=2)
