menu

Questions & Answers

Simple Nginx proxy pass not working with Laravel Valet installed

Quick backstory, I used Laravel Valet to setup a local development environment. I've since containerized the application and would like to just have Nginx proxy the main port 80 traffic to the localhost:8000 port the docker container is listening at. I've tried to remove (unpark/stop) Valet. I've commented out the lines from the nginx.conf that refer to the Valet config files. Nothing seems to work though

Here is my conf:

server {
        listen   80;
        server_name  app.trucase.test paylaw.trucase.test;
        location / {
           proxy_pass http://127.0.0.0:8000;
           proxy_set_header Host $host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }

I can go to app.trucase.test:8000 and it all works. But without the port, Nginx just isn't proxying the traffic. What am I missing?

Comments:
2023-01-17 00:47:52
Is 127.0.0.0 configured as your localhost loopback address? Or should it be 127.0.0.1?
Answers(0) :