digitalocean / digitalocean/nginxconfig.io
Not able to proxy requests for assets, media files
- Dominant language
- JavaScript
- Stars
- 28.3k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
## Information
https://whatismybrowser.com/w/MLNCGRF
## Details
# reverse proxy
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
### Description
Wrong:
# reverse proxy
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
Correct:
# reverse proxy
location ^~ / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
### Steps to reproduce
Open [this link](https://www.digitalocean.com/community/tools/nginx?domains.0.php.php=false&domains.0.reverseProxy.reverseProxy=true&domains.0.routing.index=index.html&domains.0.routing.fallbackHtml=true&global.app.lang=enUS)
### Expected behavior
I expected to have `^~` after `location` directive.
# reverse proxy
location ^~ / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
See also:
> In versions from 0.7.1 to 0.8.41, if a request matched the prefix location without the "=" and "^~" modifiers, the search also terminated and regular expressions were not checked.
### Screenshots

Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked NGINX configuration generator and trace the reverse-proxy template used by its generated output. Reproduce the configuration from the provided link, then confirm that the generated reverse-proxy location includes the ^~ modifier and that the output remains valid NGINX syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100