Nginx
rewrite reverse proxy 🔗︎
server {
listen 80
server_name example.com
location /api/ { proxy_pass http://backend-server:8080/ } }
- proxy-pass: Forwards the request to the specified backend server
```nginx
server {
listen 80;
server_name example.com;
location /old-api/ {
rewrite ^/old-api/(.*)$ /new-api/$1 break;
proxy_pass http://backend-server:8080;
}
}
- rewrite
- Match the path and replace it with new-api
- break indicates stopping the processing of subsequent rewrite rules
New articles on AI agents, full-stack engineering, and a one-person company
I email new writing about AI and agents, full-stack engineering, and building a one-person company. No spam, and you can unsubscribe anytime.