I created a subdomain (sub1.domain.com) in DirectAdmin. I then added the following custom HTTPD config to point the subdomain to a directory in /var/www/html:
It works as you might expect for HTML, but any PHP pages return a 404 with the 'No input file specified' error. The problem seems to be caused by DirectAdmin's default VirtualHost config for a subdomain, which includes a <Directory> directive. This directive isn't part of the instructions for adding global subdomain VirtualHosts, so I figured it isn't required here. Sure enough, if I manually delete it from the httpd.conf file, the error goes away.
But of course, manual edits to httpd.conf will get overwritten. So my question is, how can I remove the <Directory> directive from my subdomain using DirectAdmin's Custom HTTPD Configurations feature?
Code:
|*if SUB="sub1"|
|?SDOCROOT=/var/www/html/`SUB`|
|?SERVER_ALIASES=`SERVER_ALIASES` sub2.`DOMAIN`|
|*endif|
It works as you might expect for HTML, but any PHP pages return a 404 with the 'No input file specified' error. The problem seems to be caused by DirectAdmin's default VirtualHost config for a subdomain, which includes a <Directory> directive. This directive isn't part of the instructions for adding global subdomain VirtualHosts, so I figured it isn't required here. Sure enough, if I manually delete it from the httpd.conf file, the error goes away.
But of course, manual edits to httpd.conf will get overwritten. So my question is, how can I remove the <Directory> directive from my subdomain using DirectAdmin's Custom HTTPD Configurations feature?