# My website crash too many redirect after instaling let's encrypt

**URL:** <https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001>\
**Category:** Help\
**Created:** [June 2, 2021, 12:24pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001 "2021-06-02T12:24:26Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 5:50pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/21 "2021-06-12T17:50:29Z")

</div>

and filzela to transfer files

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 5:51pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/22 "2021-06-12T17:51:18Z")

</div>

Perfect. 🙂

Let's find out a few things.

What are the outputs of these commands?

```nohighlight
sudo apachectl -S
sudo ls -lRa /etc/apache2/sites-available
sudo ls -lRa /etc/apache2/sites-enabled

```

Please put 3 backticks above and below _each_ output, like this:

```  
output  
```

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 5:56pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/23 "2021-06-12T17:56:30Z")

</div>

> [@griffin](#):
>
> `sudo apachectl -S`

```nohighlight
root@wordpress-ubuntu-s-1vcpu-1gb-nyc3-01:~# sudo apachectl -S
VirtualHost configuration:
*:80 guesthost.tech (/etc/apache2/sites-enabled/000-default.conf:4)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: 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

```

```nohighlight
/etc/apache2/sites-available:
total 16
drwxr-xr-x 2 www-data www-data 4096 Jun 1 22:12 .
drwxr-xr-x 8 www-data www-data 4096 Jun 2 11:53 ..
-rw-r--r-- 1 www-data www-data 511 Dec 16 14:56 000-default.conf
-rw-r--r-- 1 www-data www-data 1332 Apr 13 2020 000-default.conf.dpkg-dist

```

````nohighlight
/etc/apache2/sites-enabled:
total 12
drwxr-xr-x 2 www-data www-data 4096 Jun 9 21:46 .
drwxr-xr-x 8 www-data www-data 4096 Jun 2 11:53 ..
-rw-r--r-- 1 www-data www-data 709 Jun 1 17:41 000-default.conf```
````

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 6:00pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/24 "2021-06-12T18:00:21Z")

</div>

Thanks for that. 🙂

What are the outputs of these commands?

```nohighlight
sudo cat /etc/apache2/sites-available/000-default.conf
sudo cat /etc/apache2/sites-enabled/000-default.conf

```

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 6:00pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/25 "2021-06-12T18:00:48Z")

</div>

Do you have a `.htaccess` file in your webroot directory (`/var/www/html/.htaccess`)?

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:01pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/26 "2021-06-12T18:01:54Z")

</div>

```nohighlight
root@wordpress-ubuntu-s-1vcpu-1gb-nyc3-01:~# sudo cat /etc/apache2/sites-enabled/000-default.conf
# Added to mitigate CVE-2017-8295 vulnerability
UseCanonicalName On

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        ServerName guesthost.tech
        ServerAlias www.guesthost.tech

        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =guesthost.tech [OR]
RewriteCond %{SERVER_NAME} =www.guesthost.tech
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
root@wordpress-ubuntu-s-1vcpu-1gb-nyc3-01:~# ^C
root@wordpress-ubuntu-s-1vcpu-1gb-nyc3-01:~# sudo cat /etc/apache2/sites-available/000-default.conf
# Added to mitigate CVE-2017-8295 vulnerability
UseCanonicalName On

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        ServerName $domain
        ServerAlias www.$domain

        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

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

```

```nohighlight
root@wordpress-ubuntu-s-1vcpu-1gb-nyc3-01:~# sudo cat /etc/apache2/sites-enabled/000-default.conf
# Added to mitigate CVE-2017-8295 vulnerability
UseCanonicalName On

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        ServerName guesthost.tech
        ServerAlias www.guesthost.tech

        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =guesthost.tech [OR]
RewriteCond %{SERVER_NAME} =www.guesthost.tech
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

```

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 6:02pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/27 "2021-06-12T18:02:55Z")

</div>

Can you please edit your last post to fix the backticks? The top of the first file got cutoff.

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:06pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/28 "2021-06-12T18:06:12Z")

</div>

sorry I have edited the post thank you

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:09pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/29 "2021-06-12T18:09:37Z")

</div>

I don't have the `.htaccess` file i have checked

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 6:14pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/30 "2021-06-12T18:14:55Z")

</div>

1. Remove the bad configuration.

`sudo rm /etc/apache2/sites-enabled/000-default.conf`

1. Fix the good configuration.

`sudo nano /etc/apache2/sites-available/000-default.conf`

Replace `$domain` in the `ServerName` and `ServerAlias` with `guesthost.tech`

1. Enable the good configuration.

`sudo a2ensite 000-default.conf`

1. Reload Apache.

`sudo apachectl -k graceful`

1. Check the status.

`sudo apachectl -S`

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:17pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/31 "2021-06-12T18:17:50Z")

</div>

> [@griffin](#):
>
> Replace `$domain` in the `ServerName` and `ServerAlias` with `guesthost.tech`

how to :

Replace `$domain` in the `ServerName` and `ServerAlias` with `guesthost.tech`  
after I have executed the command

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 6:18pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/32 "2021-06-12T18:18:51Z")

</div>

That command should bring up the `nano` text editor to make the changes.

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:22pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/33 "2021-06-12T18:22:19Z")

</div>

> [@griffin](#):
>
> guesthost.tech

```nohighlight
root@wordpress-ubuntu-s-1vcpu-1gb-nyc3-01:~# sudo a2ensite 000-default.conf
Enabling site 000-default.
To activate the new configuration, you need to run:
  systemctl reload apache2

```

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:23pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/34 "2021-06-12T18:23:27Z")

</div>

I Reload apache or I run the command ?

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 6:23pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/35 "2021-06-12T18:23:31Z")

</div>

Just go to the next step. It instructs you to _gracefully_ reload apache with a different command. 🙂

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:24pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/36 "2021-06-12T18:24:05Z")

</div>

oki =) I must learn to code I adore this =)

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:25pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/37 "2021-06-12T18:25:53Z")

</div>

> [@griffin](#):
>
> sudo apachectl -S

this is the result

```nohighlight
root@wordpress-ubuntu-s-1vcpu-1gb-nyc3-01:~# sudo apachectl -k graceful
root@wordpress-ubuntu-s-1vcpu-1gb-nyc3-01:~# sudo apachectl -S
VirtualHost configuration:
*:80 guesthost.tech (/etc/apache2/sites-enabled/000-default.conf:4)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
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

```

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 6:27pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/38 "2021-06-12T18:27:05Z")

</div>

Now set the Cloudflare SSL option to _Off_.

---

<div class="post-metadata">

**Author:** ![ayoub987](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ayoub987](https://community.letsencrypt.org/u/ayoub987)\
**Post date:** [June 12, 2021, 6:28pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/39 "2021-06-12T18:28:32Z")

</div>

It's done What next Sir

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [June 12, 2021, 6:31pm UTC](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001/40 "2021-06-12T18:31:25Z")

</div>

What is the output of this command?

`sudo cat /etc/apache2/sites-enabled/000-default.conf`

[Previous page](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001.md?page=1)

[Next page](https://community.letsencrypt.org/t/my-website-crash-too-many-redirect-after-instaling-lets-encrypt/153001.md?page=3)
