I have a Laravel project set up on OpenLitespeed server on a port. The IP address is 127.0.0.1:8016. I am using apache2 reverse proxy to pass requests to the OpenLitespeed server. The Laravel application works okay but after logging in I get a Laravel's 403 on all the pages that require authentication to view. I have even tried stopping the OpenLitespeed server and moving the project to apache2 but I still get the same problem. Both apache2 and OpenLitespeed are running on the same server. How can I fix this?
This is my apache conf file
<VirtualHost *:80>
    ServerAdmin admin@mysite.com
    ServerName mysite.com
    ServerAlias *.mysite.com
    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8016/
    ProxyPassReverse / http://127.0.0.1:8016/
    ProxyPassReverseCookieDomain .mysite.com 127.0.0.1
    ErrorLog "logs/mysite.com-error.log"
    CustomLog "logs/mysite.com-access.log" common
</VirtualHost>
This is my Laravel's trustedproxy.php
return [
        'proxies' => "127.0.0.1",    
        'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
    ];
via Chebli Mohamed
 
Aucun commentaire:
Enregistrer un commentaire