Would that not effectively relocate the directory on a server upgrade and cause 
all existing certificates to no longer be found?

> Am 15.02.2019 um 11:09 schrieb jor...@apache.org:
> 
> Author: jorton
> Date: Fri Feb 15 10:09:53 2019
> New Revision: 1853631
> 
> URL: http://svn.apache.org/viewvc?rev=1853631&view=rev
> Log:
> * modules/md/mod_md_config.c (md_mod_conf_get): Use state-dir-relative
>  default base_dir.
> 
> Modified:
>    httpd/httpd/trunk/modules/md/mod_md_config.c
> 
> Modified: httpd/httpd/trunk/modules/md/mod_md_config.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/mod_md_config.c?rev=1853631&r1=1853630&r2=1853631&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/md/mod_md_config.c (original)
> +++ httpd/httpd/trunk/modules/md/mod_md_config.c Fri Feb 15 10:09:53 2019
> @@ -54,10 +54,18 @@
> 
> #define DEF_VAL     (-1)
> 
> +#ifndef MD_DEFAULT_BASE_DIR
> +#define MD_DEFAULT_BASE_DIR "md"
> +#endif
> +
> /* Default settings for the global conf */
> static md_mod_conf_t defmc = {
>     NULL,
> -    "md",
> +#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2)
> +    NULL, /* apply default state-dir-relative */
> +#else
> +    MD_DEFAULT_BASE_DIR,
> +#endif
>     NULL,
>     NULL,
>     80,
> @@ -113,6 +121,11 @@ static md_mod_conf_t *md_mod_conf_get(ap
>         mod_md_config->mds = apr_array_make(pool, 5, sizeof(const md_t *));
>         mod_md_config->unused_names = apr_array_make(pool, 5, sizeof(const 
> md_t *));
> 
> +#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2)
> +        mod_md_config->base_dir = ap_state_dir_relative(pool,
> +                                                        MD_DEFAULT_BASE_DIR);
> +#endif
> +
>         apr_pool_cleanup_register(pool, NULL, cleanup_mod_config, 
> apr_pool_cleanup_null);
>     }
> 
> 
> 

Reply via email to