Using variables in apache conf file

Steps to include variable(s) in apache configuration file

Step 1

Install libapache2-mod-macro module

apt-get install libapache2-mod-macro
a2enmod macro
/etc/init.d/apache2 restart

Step 2

Add macro defination in your conf file

<Macro VHost $dir>
<VirtualHost *:80>
DocumentRoot "/var/www/windowswww/$dir/public"

Use VHost learnzf1

In the example above the variable $dir will contain the value learnzf1

what clients say about us

Client testimonials

Our sites look great and run smoothly. Thanks for all your hard work and patience in getting us to where we are today.

contact us

Contact Us

If you have questions or want us to send you a quote for project please email us.

latest news


PHPUnit mock magic functions
Learn more about PHPUnit Partial Mock.