- Locate the nginx.conf file
- Comment out any other server blocks and the following commands
Code Block language text title nginx configuration server { location / { # To turn this into a forward proxy, uncomment the line below (or the one after) - SAW #proxy_pass http://localhost:8085/; # If you have a webserver running on IP:port via docker try the command below - SAW proxy_pass http://192.168.99.100:8888/; } # ~ character indicates that a regular expression will follow # The regex below matches on any image file with the extensions gif, jpg or png location ~ \.(gif|jpg|png)$ { root /pf/nginx/sels-sandpit/dataa/images; } } # Selvyn's proxy server setup # Essentially this sets up a nginx listener on 8085 and distributes content from "/pf/nginx/sels-sandpit/data/up1" for base url pattern match server { listen 8085; root /pf/nginx/sels-sandpit/data/up1; location / { } }
Restart nginx
- nginx -s reload
...