I'm having trouble figuring out the basic syntax for proxying most traffic to a local Solr install but leaving one path/dir requests being sent to a static html directory. Do all secondary, tertiary, etc... locations need to be set by regex? Haven't been able to find a simple guide on this.
current errors: /adv/index.html - 404 - Not found /adv/ - 403 Forbidden /solr/ - works fine
Here is my config:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
#include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
index index.html;
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80;
location / {
proxy_pass http://localhost:8983;
}
location /adv/ {
# also wasn't sure what permissions needed here
# recursively set adv folder and files within to 777
alias /var/www/adv;
}
}
}