Laravel Hosting in Hostinger

First, I plan to host the default Hostinger-provided WordPress site, and then host Laravel pages inside a subdirectory. For example, https://piappstudio.com will be my main WordPress page, and https://piappstudio.com/biggboss will redirect to a Laravel BiggBoss page.

404 Error on subfolder

https://piappstudio.com/biggboss gave a 404 error, but https://piappstudio.com/biggboss/public started working as expected. I contacted the Hostinger team, and they suggested using a subdomain to resolve the issue. Therefore, https://biggboss.piappstudio.com has been created.

Remember, by default hostiner doesn’t support SSL for subdomains, however, I could see the my subdomain provides valid SSL certificate

Symlink Error

Somehow, I couldn’t create the symlink for the Laravel storage/public folder, which prevented proper access to the images. When I connected via SSH terminal and tried to execute php artisan storage:link, I encountered the following issue.


Solution is remove the sysmlink from disable functions of vpn php_info.


SMTP Configuaration issue

I have properly configured SMTP through the Laravel .env file; however, emails are not being sent. The issue was with MAIL_MAILER. Previously, I used MAIL_MAILER=log, which only printed logs instead of sending real emails. Please be mindful of this configuration.

MAIL_MAILER=smtp
MAIL_HOST=smtp.hostinger.com
MAIL_PORT=465
MAIL_USERNAME=usermail
MAIL_PASSWORD=password
MAIL_ENCRYPTION=telnet
MAIL_FROM_ADDRESS="useremailaddress"
MAIL_FROM_NAME="${APP_NAME}"

Leave a Comment

Your email address will not be published. Required fields are marked *