User Tools

Site Tools


wiki:setting_up_website_behind_cloudflare_proxies

Setting up a website behind Cloudflare proxies

If you are moving a website (Wordpress e.g.) to a new server, after you have transferred the files and database and set up the webserver, you need to enable SSL on your new server as well, because the Cloudflare will refuse to connect to your new server.

To do this enable apache ssl module

a2enmod ssl
systemctl restart apache2

Now go to Cloudflare DNS settings and point the A record to your new server's IP and change the proxy setting from “Proxied” to “DNS only”. This is only temporary so that we can generate the Letsencrypt certificates.

Now install certbot and get the certificates for your site.

After that you can reenable the “Proxied” option at Cloudflare.

Tested on

  • Debian 10
  • certbot 0.31.0-1+deb10u1

See also

References

wiki/setting_up_website_behind_cloudflare_proxies.txt · Last modified: 2021/03/29 16:25 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki