How to set up Zero SSL with 'HTTP challenge' method?

This can be done easily with the two most commonly used web servers: 

  • Apache
  • Nginx

Apache

To configure this on an Apache web server, follow these steps:

  1. Log in to the machine running the Apache2 server

  2. Open your Apache2 server configuration file

    /etc/apache2/apache2.conf
    	
    and
    /etc/apache2/sites-enabled/
    	

    are the default locations for the configuration file

  3. Add a redirect statement in the appropriate location within the configuration file.
    RedirectMatch 302 /.well-known/acme-challenge/(.*) http://http.ssl.fusioncdn.com/.well-known/acme-challenge/$1<br>
    	
  4. Restart the Apache2 server with minimal downtime by using the following command:
    apachectl -k graceful<br>
    	

Nginx

To configure this on an Nginx web server, follow these steps:

  1. Log in to the machine running the Nginx server

  2. Open your Nginx server configuration file. /etc/nginx/nginx.conf and /etc/nginx/conf.d/ are the default locations for the configuration files.

  3. There are two equally valid methods for this step:

    • Option 1 (recommended): add a location block with a return directive to perform the redirect within the appropriate server block.
      location /.well-known/acme-challenge/ {    
      return 302 http://http.ssl.fusioncdn.com$request_uri;
      }
      		
    • Option 2: add a rewrite directive within the server block.
      rewrite ^/(\.well-known/acme-challenge/) http://http.ssl.fusioncdn.com$request_uri redirect;
      		
  4. Restart the Nginx server with minimal downtime by using the following command:
    nginx -s reload