I have a nextjs application running in a docker. When I had the same docker image running locally and goto localhost:3000 everything runs perfectly.
I then deploy the image to the server and I have apache2 proxy passing to the site I get a broken landing page
I see I am getting errors like this
Request URL: http://example.com/_next/static/css/175964cd052c7c3f.css
Request Method: GET
Status Code: 502 Proxy Error
My apache setup is like this
<VirtualHost *:80>
ServerName example.com
ServerAlias example.com
ProxyPreserveHost On
ProxyRequests Off
ProxyVia On
ProxyPass /excluded !
ProxyPass / http://127.0.0.1:3000 connectiontimeout=6000 timeout=6000
ProxyPassReverse / http://127.0.0.1:3000
CustomLog /var/log/apache2/mydomain.access.log combined
ErrorLog /var/log/apache2/mydomain.error.log
</VirtualHost>
Any help would be appreciated
Thanks