# Misdirected Request error after generating SSL certificate

**URL:** <https://forum.hestiacp.com/t/misdirected-request-error-after-generating-ssl-certificate/19507>\
**Category:** Uncategorized\
**Created:** [July 13, 2025, 12:38pm UTC](https://forum.hestiacp.com/t/misdirected-request-error-after-generating-ssl-certificate/19507 "2025-07-13T12:38:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anon85655380](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/a/e56c9b/32.png) [@anon85655380](https://forum.hestiacp.com/u/anon85655380)\
**Post date:** [July 13, 2025, 12:44pm UTC](https://forum.hestiacp.com/t/misdirected-request-error-after-generating-ssl-certificate/19507/3 "2025-07-13T12:44:22Z")

</div>

> [@Nginx + apache + ssl = 421 misdirected request](https://forum.hestiacp.com/t/nginx-apache-ssl-421-misdirected-request/19502/5):
>
> You can execute these commands to do the change automatically: for file in $(grep -l proxy\_pass /usr/local/hestia/data/templates/web/nginx/\*.stpl); do if ! grep -q proxy\_ssl\_server\_name "$file"; then sed -i '/proxy\_pass/ i\\t\tproxy\_ssl\_server\_name on;\n\t\tproxy\_ssl\_name $host;' "$file"; fi; done for i in $(v-list-users plain | cut -f1); do echo "Rebuilding web domains for user $i"; v-rebuild-web-domains $i yes; done And for mail domains: for file in $(grep -l proxy\_pass /usr/local/hestia/da…

---

_[View the full topic](https://forum.hestiacp.com/t/misdirected-request-error-after-generating-ssl-certificate/19507)._
