# 503 error when performing the challenge

**URL:** <https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045>\
**Category:** Help\
**Created:** [November 11, 2019, 5:04pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045 "2019-11-11T17:04:20Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![arnoldbird](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@arnoldbird](https://community.letsencrypt.org/u/arnoldbird)\
**Post date:** [November 11, 2019, 5:04pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/1 "2019-11-11T17:04:20Z")

</div>

I ran the command:

/usr/local/bin/certbot-auto certonly --apache

I am getting a 503 error, even though the site is up and running:

Domain: education.mei.edu  
Type: unauthorized  
Detail: Invalid response from  
[http://education.mei.edu/.well-known/acme-challenge/QGncld\_7RLnN2a4UbOoYK7-edsJM3-HzSQS7IvEdmgE](http://education.mei.edu/.well-known/acme-challenge/QGncld_7RLnN2a4UbOoYK7-edsJM3-HzSQS7IvEdmgE)  
[74.207.228.46]: “\n \<!DOCTYPE html\>\n \<html\>\n \<head\>\n  
\<title\>503 Service Unavailable\</title\>\n \<style  
type=“text/css”\>\n #page {w”

To fix these errors, please make sure that your domain name was  
entered correctly and the DNS A/AAAA record(s) for that domain  
contain(s) the right IP address.

I have made the .well-known directory writable by apache, but the acme-challenge directory isn’t created when I run the certonly command.

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [November 11, 2019, 6:11pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/2 "2019-11-11T18:11:44Z")

</div>

Hi @arnoldbird

> [@arnoldbird](#):
>
> Domain: education.mei.edu  
> Type: unauthorized  
> Detail: Invalid response from  
> [http://education.mei.edu/.well-known/acme-challenge/QGncld\_7RLnN2a4UbOoYK7-edsJM3-HzSQS7IvEdmgE](http://education.mei.edu/.well-known/acme-challenge/QGncld_7RLnN2a4UbOoYK7-edsJM3-HzSQS7IvEdmgE)

checking that url I see the expected result http status 404 - Not Found. Not a 503.

But the page is terrible slow - 5 - 10 seconds, that's critical.

---

<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:** [November 11, 2019, 6:17pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/3 "2019-11-11T18:17:24Z")

</div>

> [@JuergenAuer](#):
>
> But the page is terrible slow - 5 - 10 seconds, that’s critical.

Agreed; the site is way too slow.  
Is it running low on resources (memory)?  
Is it trying to do too much (CPU)?

---

<div class="post-metadata">

**Author:** ![arnoldbird](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@arnoldbird](https://community.letsencrypt.org/u/arnoldbird)\
**Post date:** [November 11, 2019, 6:33pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/4 "2019-11-11T18:33:57Z")

</div>

There is a 404 at that URL because there is nothing there. Certbot is not able to create the acme-challenge directory, apparently.

The site itself is not slow. You can quickly access this page: [http://education.mei.edu/.well-known/test.html](http://education.mei.edu/.well-known/test.html)  
It loads instantly.

---

<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:** [November 11, 2019, 7:29pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/5 "2019-11-11T19:29:27Z")

</div>

Try adding a file (that doesn’t end in .html) in the full challenge location:  
`http://education.mei.edu/.well-known/acme-challenge/testfile`

---

<div class="post-metadata">

**Author:** ![arnoldbird](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@arnoldbird](https://community.letsencrypt.org/u/arnoldbird)\
**Post date:** [November 11, 2019, 7:58pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/6 "2019-11-11T19:58:59Z")

</div>

Please see [http://education.mei.edu/.well-known/acme-challenge/some-file](http://education.mei.edu/.well-known/acme-challenge/some-file)

---

<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:** [November 11, 2019, 8:00pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/7 "2019-11-11T20:00:51Z")

</div>

Try again:

> [@arnoldbird](#):
>
> /usr/local/bin/certbot-auto certonly --apache

Show all that happens next.  
Or/also show the Letsencrypt log file.  
[it is likely that certbot is unable to properly locate where to place the challenge files]

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [November 11, 2019, 8:01pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/8 "2019-11-11T20:01:26Z")

</div>

What says

```auto
apachectl -S

```

---

<div class="post-metadata">

**Author:** ![arnoldbird](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@arnoldbird](https://community.letsencrypt.org/u/arnoldbird)\
**Post date:** [November 11, 2019, 8:43pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/9 "2019-11-11T20:43:04Z")

</div>

VirtualHost configuration:  
127.0.0.1:8080 is a NameVirtualHost  
default server mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:4)  
port 8080 namevhost mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:4)  
alias www.mei.edu  
alias education.mei.edu  
wildcard NameVirtualHosts and _default_ servers:  
\*:80 mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:26)  
\*:443 is a NameVirtualHost  
default server mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:34)  
port 443 namevhost mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:34)  
alias www.mei.edu  
alias education.mei.edu  
port 443 namevhost webster.mei.edu (/etc/httpd/conf.d/ssl.conf:74)  
Syntax OK

---

<div class="post-metadata">

**Author:** ![arnoldbird](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@arnoldbird](https://community.letsencrypt.org/u/arnoldbird)\
**Post date:** [November 11, 2019, 8:44pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/10 "2019-11-11T20:44:45Z")

</div>

[root@webster public]# /usr/local/bin/certbot-auto certonly --apache  
Saving debug log to /var/log/letsencrypt/letsencrypt.log  
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?

* * *

1: mei.edu  
2: education.mei.edu  
3: www.mei.edu

* * *

Select the appropriate numbers separated by commas and/or spaces, or leave input  
blank to select all options shown (Enter ‘c’ to cancel): 2  
Obtaining a new certificate  
Performing the following challenges:  
http-01 challenge for education.mei.edu  
Waiting for verification…  
Challenge failed for domain education.mei.edu  
http-01 challenge for education.mei.edu  
Cleaning up challenges  
Some challenges have failed.

IMPORTANT NOTES:

- The following errors were reported by the server:

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [November 11, 2019, 8:45pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/11 "2019-11-11T20:45:14Z")

</div>

You don't have a port 80 vHost with `education.mei.edu` as domain name.

That's required to create a certificate via http validation.

> [@arnoldbird](#):
>
> Detail: Invalid response from  
> [http://education.mei.edu/.well-known/acme-challenge/FxTDNFB3yw4h3xppZIBbGj6YdbSqMvsC7Pu5XMq8pjQ](http://education.mei.edu/.well-known/acme-challenge/FxTDNFB3yw4h3xppZIBbGj6YdbSqMvsC7Pu5XMq8pjQ)  
> [74.207.228.46]: "\n \n \n \n
> 
> 503 Service Unavailable\n \n #page {w"

If you use `--apache` with a not working configuration, that may break your config -\> http status 500.

---

<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:** [November 11, 2019, 8:48pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/12 "2019-11-11T20:48:48Z")

</div>

> [@arnoldbird](#):
>
> Plugins selected: Authenticator apache, Installer apache

Or don't tell `certbot` to try and figure out your Apache config...  
And use `certonly` with `--webroot -w /path/to/your/files`

---

<div class="post-metadata">

**Author:** ![arnoldbird](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@arnoldbird](https://community.letsencrypt.org/u/arnoldbird)\
**Post date:** [November 11, 2019, 8:51pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/13 "2019-11-11T20:51:21Z")

</div>

I just made the following change to my Apache config…

```
<VirtualHost *:80>
   ServerAdmin webmaster@mei.edu
   DocumentRoot /opt/prod/mei.edu/public
  # ServerName mei.edu
  # ServerAlias www.mei.edu
  # ServerAlias education.mei.edu
   ServerName education.mei.edu
</VirtualHost>

```

I commented out the three lines above and added the new ServerName and restarted Apache. I still get the same response when I run the certonly command. Something else I need to do in the Apache config? Thanks.

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [November 11, 2019, 8:52pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/14 "2019-11-11T20:52:57Z")

</div>

That looks good.

> [@arnoldbird](#):
>
> I still get the same response when I run the certonly command.

Again: What says

```nohighlight
apachectl -S

```

---

<div class="post-metadata">

**Author:** ![arnoldbird](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@arnoldbird](https://community.letsencrypt.org/u/arnoldbird)\
**Post date:** [November 11, 2019, 8:53pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/15 "2019-11-11T20:53:38Z")

</div>

127.0.0.1:8080 is a NameVirtualHost  
default server mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:4)  
port 8080 namevhost mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:4)  
alias www.mei.edu  
alias education.mei.edu  
wildcard NameVirtualHosts and _default_ servers:  
\*:80 education.mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:26)  
\*:443 is a NameVirtualHost  
default server mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:35)  
port 443 namevhost mei.edu (/etc/httpd/conf.d/1-mei-edu.conf:35)  
alias www.mei.edu  
alias education.mei.edu  
port 443 namevhost webster.mei.edu (/etc/httpd/conf.d/ssl.conf:74)  
Syntax OK

---

<div class="post-metadata">

**Author:** ![arnoldbird](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@arnoldbird](https://community.letsencrypt.org/u/arnoldbird)\
**Post date:** [November 12, 2019, 1:33pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/16 "2019-11-12T13:33:23Z")

</div>

Thanks. That did it. The full command that worked for me…

/usr/local/bin/certbot-auto certonly --webroot -w /path/to/my/public\_html -d education.mei.edu

---

<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:** [December 12, 2019, 1:33pm UTC](https://community.letsencrypt.org/t/503-error-when-performing-the-challenge/106045/17 "2019-12-12T13:33:25Z")

</div>

Closed on December 12, 2019, 1:33pm UTC

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