My subdomain config:
/etc/apache2/sites-available/sub.domain.conf
<VirtualHost ip:80>
ServerName sub.domain.hu
ServerAlias http://www.sub.domain.hu
DocumentRoot /var/www/virtual/domain/sub/htdocs
DirectoryIndex disabled
LogLevel error
ErrorLog /var/log/apache2/sub.domain/error.log
Alias /errors/ /var/www/virtual/domain/errors/
SuexecUserGroup vu2003 vu2003
<Directory /var/www/virtual/domain/sub/htdocs>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Options +ExecCGI
FCGIWrapper /var/www/fcgi/sub.domain/php-fcgi-starter
DirectoryIndex index.html index.xhtml index.htm
Require all granted
<Files *m3u>
ForceType application/x-httpd-php
</Files>
</Directory>
Alias /cgi-bin/ /var/www/virtual/domain/sub/cgi-bin/
<Directory /var/www/virtual/domain/sub/cgi-bin>
AllowOverride AuthConfig Indexes Limit Options=Indexes,MultiViews \
Fileinfo=RewriteEngine,RewriteOptions,RewriteBase,RewriteCond,RewriteRule Nonfatal=Override
DirectoryIndex index.cgi index.pl index.py index.rb
Options FollowSymLinks ExecCGI
AddHandler cgi-script .cgi .pl .py .rb
Require all granted
</Directory>
<IfModule mime_module>
AddHandler application/x-httpd-php .m3u
</IfModule>
Include /etc/apache2/imscp/sub.domain.conf
</VirtualHost>
/var/www/virtual/domain/sub/htdocs/
.htaccess:
AddHandler application/x-httpd-php .m3u
AddType application/x-httpd-php70 .m3u
AddType application/x-httpd-php .m3u