I'm trying to set a virtual host on apache2 with this configuration.
<VirtualHost *:80>
ServerName mysite.com
ServerAlias www.mysite.com
<If "-R '192.168.1.0/24'">
Define directory_path /srv/http/mysite
</If>
<Else>
Define directory_path /srv/http/under_construction
</Else>
DocumentRoot ${directory_path}
<Directory ${directory_path}>
Require all granted
</Directory>
</VirtualHost>
The problem is that the If directive does not match when I access it
from that lan.
I'm using Apache/2.4.18.
--
Ivan Ionu?
Str. S?li?te 20, Galati 800023
Tel/Fax: +40236 493277
Email: ivan.ionut@tehnopol-gl.ro
_The content of this email is confidential and intended for the
recipient specified in message only. It is strictly forbidden to share
any part of this message with any third party, without a written consent
of the sender. If you are not the intended recipient of this message,
please notify the sender immediately, and delete the message and any
attachments. Any disclosure, reproduction, distribution or other use of
this message or any attachments by an individual or entity other than
the intended recipient is prohibited._
<VirtualHost *:80>
ServerName mysite.com
ServerAlias www.mysite.com
<If "-R '192.168.1.0/24'">
Define directory_path /srv/http/mysite
</If>
<Else>
Define directory_path /srv/http/under_construction
</Else>
DocumentRoot ${directory_path}
<Directory ${directory_path}>
Require all granted
</Directory>
</VirtualHost>
The problem is that the If directive does not match when I access it
from that lan.
I'm using Apache/2.4.18.
--
Ivan Ionu?
Str. S?li?te 20, Galati 800023
Tel/Fax: +40236 493277
Email: ivan.ionut@tehnopol-gl.ro
_The content of this email is confidential and intended for the
recipient specified in message only. It is strictly forbidden to share
any part of this message with any third party, without a written consent
of the sender. If you are not the intended recipient of this message,
please notify the sender immediately, and delete the message and any
attachments. Any disclosure, reproduction, distribution or other use of
this message or any attachments by an individual or entity other than
the intended recipient is prohibited._