Issue
I am using Apache Friends XAMPP in Windows (Local Server). I setup the virtual host in httpd-vhosts.conf
in an Apache configuration directory like this
NameVirtualHost *:80
<VirtualHost *:80>
ServerName test.example.com
DocumentRoot "E:\xampp\htdocs\example"
</VirtualHost>
This works fine when I browse the URL
http://test.example.com
Is it possible to create virtual host from Apache .htaccess dynamically?
Solution
The context for VirtualHost
has to be server config
. See the Apache docs.
This means that the directive may be used in the server configuration files (e.g., httpd.conf), but not within any or containers. It is not allowed in .htaccess files at all.
Answered By - Matthias Answer Checked By - Cary Denson (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.