Is there a way to use the DocumentRoot as a variable in further sections of a site's config file in Apache?
Something as below:
DocumentRoot /var/www/myNiceRoot
<Directory $DocumentRoot/mySubDir> ... </>
apache-2.2apache-2.4configuration
Is there a way to use the DocumentRoot as a variable in further sections of a site's config file in Apache?
Something as below:
DocumentRoot /var/www/myNiceRoot
<Directory $DocumentRoot/mySubDir> ... </>
Best Answer
You can define a variable and then use that
and then use it later
and so on.