I am currently developing a system (HRMIS-SM) using PHPMaker on an Ubuntu environment.
The application is hosted behind a Reverse Proxy. External traffic hits the proxy on Port 80, but the internal Apache server, where the PHPMaker project resides, listens on Port 8080.
The Problem: When the system generates activation emails, the $ActivateLink variable includes the internal port (:8080) in the URL (e.g., http://hrmis-sm.health.gov.lk:8080/activate). This causes the links to fail for external users.
Current Environment Details:
-
Operating System: Ubuntu
-
Web Server: Apache (Listening on 8080)
-
Proxy: Apache (Listening on 80)
-
PHP
$_SERVERstatus: *HTTP_HOST: hrmis-sm.health.gov.lkSERVER_PORT: 8080
What I have tried:
-
Configured
mod_remoteipandProxyPreserveHost Onin Apache. -
Attempted to manually override
$_SERVER['SERVER_PORT'] = 80;in theGlobal Codesection. -
The system still includes:8080 in the activation email links.
My Question: Is there a specific setting within the PHPMaker project (e.g., in the PHP -> General Options or a specific Server Event) that forces the application to ignore the internal port 8080 and use Port 80 for all generated URLs and email links?