vHost Conf to access child folder

I have created domain in my website panel (subdomain) in that subdomain I’ve uploaded laravel application which index.php file is placed inside public folder. So my laravel working address is like this


But when I visit my URL like: example.com/subdomain.com it loads “CyberPanel Installed” message which is referred to /home/example.com/public_html/subdomain.com/ and not /home/example.com/public_html/subdomain.com/public

My question is:

How to config my server in order to, when i try to access example.com/subdomain.com in loads /home/example.com/public_html/subdomain.com/public and not /home/example.com/public_html/subdomain.com/?

The directory structure doesn’t work that way again. The working directory now is /home/example.com/subdomain.com/ and not inside the public_html of your main domain. Then make sure that you don’t have any other public_html folder again in your subdomain.
Just place your script file, laravel, or whatever directly inside the subdomain folder which has your index.php or index.html file.