bndw / wifi-card

📶 Print a QR code for connecting to your WiFi (wificard.io)
https://wificard.io
MIT License
6.58k stars 460 forks source link

Nginx Config #277

Closed wxyShine closed 4 months ago

wxyShine commented 9 months ago
location   ^~  /wifi-card/ {
    proxy_pass http://172.17.0.1:8096/;
    proxy_redirect  off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
}

This configures the home page to come out, static resources appear 404

wxyShine commented 7 months ago

https://www.wxy97.com/wifi-card/

bndw commented 7 months ago

Are you having this problem when running the Docker image?

wxyShine commented 6 months ago

Are you having this problem when running the Docker image?

yes docker

bndw commented 6 months ago

The bndw/wifi-card Docker image uses the nginx base image. You should be able to provide your own nginx config file when you run the image, e.g.

docker run -v /host/path/nginx.conf:/etc/nginx/nginx.conf bndw/wifi-card
bndw commented 4 months ago

@wxyShine I'm going to close this issue as I believe passing in your own nginx config to the docker container is the best solution.