# Can I use an existing certificate for mail?

**URL:** <https://community.letsencrypt.org/t/can-i-use-an-existing-certificate-for-mail/9483>\
**Category:** Server\
**Created:** [January 25, 2016, 3:51pm UTC](https://community.letsencrypt.org/t/can-i-use-an-existing-certificate-for-mail/9483 "2016-01-25T15:51:06Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [January 25, 2016, 6:39pm UTC](https://community.letsencrypt.org/t/can-i-use-an-existing-certificate-for-mail/9483/9 "2016-01-25T18:39:57Z")

</div>

> [@PrincessAirhead](#):
>
> Could you give an example of how I would allow requests to the challenge?

For example:

```
<VirtualHost *:80>
        Servername le-test-06.example.com
        DocumentRoot /var/www/vhosts/le-test-06.example.com/htdocs/

        <Directory "/var/www/vhosts/le-test-06.example.com/htdocs/">
                Require all denied
        </Directory>
        <Directory "/var/www/vhosts/le-test-06.example.com/htdocs/.well-known/acme-challenge">
                Require all granted
        </Directory>
</VirtualHost>

```

Did the trick on my server. 🙂 If you really want to be correct, you could/should put the [`<Directory>`](http://httpd.apache.org/docs/2.4/mod/core.html#directory) containers between [`<IfModule mod_authz_core.c>`](http://httpd.apache.org/docs/2.4/mod/core.html#ifmodule) and `</IfModule>` because the [`Require`](http://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#require) directive is part of the [`mod_authz_core`](http://httpd.apache.org/docs/2.4/mod/mod_authz_core.html) module.

Your location of the webroot might be different ofcourse. Just use the directory from the [`DocumentRoot`](http://httpd.apache.org/docs/2.4/mod/core.html#documentroot) directive, once without modification and once with the `.well-known/acme-challenge/` part trailing it, in that order (deny, allow)..

---

_[View the full topic](https://community.letsencrypt.org/t/can-i-use-an-existing-certificate-for-mail/9483)._
