Re: [users@httpd] File structure for nearly identical sites

2020-07-10 Thread Yehuda Katz
Your best option to do that might be to add a separate file with that
config and call it with IncludeOptional

For example:


ServerName $domain
ServerAlias www.$domain

DocumentRoot "/var/www/vhosts/$name"
ErrorLog "/var/log/httpd/$name.error_log"
CustomLog "/var/log/httpd/$name.access_log" combined

IncludeOptional "/var/www/config/$name.conf"


You can then add the different config to those files.

- Y

On Thu, Jul 9, 2020 at 4:25 PM Darryl Philip Baker <
darryl.ba...@northwestern.edu> wrote:

> I am getting a set of over 50 sites moved over to my server from elsewhere
> and the content manager want to duplicate each of these in a dev subdomain.
> An example eatatjoes.example.com and eatatjoes.dev.example.com. I am
> thinking that I can include the same configuration file twice if I replace
> the “dev.” with a macro. The first time in include the file the macro has
> the value of “.” And the second time the value of the macro is “dev.” I
> would do something similar for the document directory.
>
>
>
> Is there a way of keeping some directives from being in the live
> configuration for just the second time I include the file?
>
>
>
> In my case there are likely to be redirects as they test a site prior to a
> relaunch. They like to keep bookmarks working even after restructuring a
> site.
>
>
>
> *Darryl Baker, *GSEC  (he/him/his)
>
> Sr. System Administrator
>
> Distributed Application Platform Services
>
> *Northwestern University*
>
> 1800 Sherman Ave.
>
> Suite 6-600 – Box #39
>
> Evanston, IL  60201-3715
>
> *darryl.ba...@northwestern.edu *
>
> (847) 467-6674
>
>
>


[users@httpd] File structure for nearly identical sites

2020-07-09 Thread Darryl Philip Baker
I am getting a set of over 50 sites moved over to my server from elsewhere and 
the content manager want to duplicate each of these in a dev subdomain. An 
example eatatjoes.example.com and eatatjoes.dev.example.com. I am thinking that 
I can include the same configuration file twice if I replace the “dev.” with a 
macro. The first time in include the file the macro has the value of “.” And 
the second time the value of the macro is “dev.” I would do something similar 
for the document directory.

Is there a way of keeping some directives from being in the live configuration 
for just the second time I include the file?

In my case there are likely to be redirects as they test a site prior to a 
relaunch. They like to keep bookmarks working even after restructuring a site.

Darryl Baker, GSEC  (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
1800 Sherman Ave.
Suite 6-600 – Box #39
Evanston, IL  60201-3715
darryl.ba...@northwestern.edu
(847) 467-6674