Ah ok well something like this might work:
Module Admin -> Apache Config -> Override Vhost -> Custom Entry
Module Admin -> Apache Config -> Override Vhost -> Custom Entry
Code:
<Directory "/var/zpanel/hostdata/username/public_html/panel.domain.com/">
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ ./public/$1 [L]
</Directory>
<Directory "/var/zpanel/hostdata/username/public_html/panel.domain.com/public/">
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</Directory>