ZeroFearX Posted January 18, 2018 Share Posted January 18, 2018 Is there a way to define the value of a VirtualHost DocumentRoot based on the return of a cgi script? Let me explain, I want to create a wildcard subdomain VirtualHost such as *.mydomain.com. When the client goes on any subdomain, it would automaticly run myscript.pl and then, the perl script would return or define the proper DocumentRoot value. Is this achievable on apache ? Perl script is only for example, if you have anything else to propose. Thank you Link to comment https://www.neowin.net/forum/topic/1353756-apache-dynamic-documentroot-value-for-wildcard-virtualhost/ Share on other sites More sharing options...
+BudMan MVC Posted January 19, 2018 MVC Share Posted January 19, 2018 wouldn't that just be default page that gets served when server doesn't have a defined virtual host for what was asked for? From there you can run your script and redirect them to whatever other page you might want by the host header they used to access the default page. Link to comment https://www.neowin.net/forum/topic/1353756-apache-dynamic-documentroot-value-for-wildcard-virtualhost/#findComment-598166910 Share on other sites More sharing options...
Recommended Posts