Laravel and ProxyPass/ProxyPassReverse base URL fix« Wróć do listy pytań
how to fix base url? indead of local hostname
|
▲ ▼ |
WARNING!: this solution is not working for /login methon od auth controller. WORKAROUND: try to change ProxyPass url from my.service.local to my.service.com and modify /ets/hosts file of those two servers to point that my.service.com to local ip address of internal server |
▲ ▼ |
1. edit /routes/api.php
$proxy_url = getenv('PROXY_URL'); $proxy_schema = getenv('PROXY_SCHEMA'); if (!empty($proxy_url)) { URL::forceRootUrl($proxy_url); } if (!empty($proxy_schema)) { URL::forceSchema($proxy_schema); } 3. edit .env file
PROXY_URL = http://internet.address.com PROXY_SCHEMA = http |