I’m encountering an issue with my Laravel deployment on an Apache 2.4 server running on Windows Server 2019. Here’s the setup:
Issue:
I have deployed my Laravel application on an Apache 2.4 server, and I’m using a Windows Server 2019 environment. The deployment server is accessed through a proxy server using the URL https://eapp.test.com.my/system. However, due to this additional segment in the base URL, various issues are arising.
Route Prefixing: To accommodate the base URL segment /system, I’ve prefixed all my routes with /system. While this allows access to the system, it’s causing issues with accessing images and other resources.
Resource Access Problem: When trying to access resources like images using the URL https://eapp.test.com.my/system/images/image.png, they cannot be found.
Current Apache Virtual Host Configuration:
<VirtualHost *:80>
DocumentRoot "D:/location_system"
DirectoryIndex index.php
ServerName https://eapp.test.com.my/system
<Directory "D:/location_system">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
No changes in .htacces.
I need assistance in resolving the issue of accessing resources like images and other assets.
But if access direct using ip address all working as expected.
Muhammad Syahmi Abdul Jalil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.