MarginaliaSearch/run/nginx-site.conf

80 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-03-04 13:00:46 +00:00
server {
listen 80;
listen [::]:80;
server_name nginx;
proxy_set_header X-Context $remote_addr-$connection;
proxy_set_header X-Extern-Url $scheme://$host$request_uri;
proxy_set_header X-Extern-Domain $scheme://$host;
proxy_set_header X-User-Agent $http_user_agent;
proxy_set_header X-Public "1";
rewrite ^/shuffle/$ /search?query=browse:random&profile=yolo;
rewrite ^/explore/(.*)$ /search?query=browse:$1&profile=yolo;
rewrite ^/links/(.*)$ /search?query=links:$1&profile=corpo;
location /screenshot {
2023-10-15 16:38:30 +00:00
proxy_pass http://assistant-service/public/screenshot;
2023-03-04 13:00:46 +00:00
}
location /site-search {
2023-10-15 16:38:30 +00:00
proxy_pass http://search-service/public/site-search;
2023-03-04 13:00:46 +00:00
}
location /site/suggest {
2023-10-15 16:38:30 +00:00
proxy_pass http://search-service/public/site/suggest;
2023-03-04 13:00:46 +00:00
}
location /site/flag-site {
2023-10-15 16:38:30 +00:00
proxy_pass http://search-service/public/site/flag-site;
2023-03-04 13:00:46 +00:00
}
location /site/ {
rewrite ^/site/(.*)$ /search?query=site:$1&profile=yolo;
}
2023-03-22 14:11:22 +00:00
location /suggest/ {
2023-10-15 16:38:30 +00:00
proxy_pass http://assistant-service/public$request_uri;
2023-03-22 14:11:22 +00:00
access_log off;
}
2023-03-04 13:00:46 +00:00
location / {
2023-10-15 16:38:30 +00:00
proxy_pass http://search-service/public/;
2023-03-04 13:00:46 +00:00
}
}
2023-07-10 16:58:33 +00:00
server {
listen 81;
listen [::]:81;
server_name control;
proxy_set_header X-Context $remote_addr-$connection;
proxy_set_header X-Extern-Url $scheme://$host$request_uri;
proxy_set_header X-Extern-Domain $scheme://$host;
proxy_set_header X-User-Agent $http_user_agent;
proxy_set_header X-Public "1";
location / {
2023-10-15 16:38:30 +00:00
proxy_pass http://control-service/public/;
access_log off;
2023-07-10 16:58:33 +00:00
}
}
server {
listen 82;
listen [::]:82;
server_name control;
proxy_set_header X-Context $remote_addr-$connection;
proxy_set_header X-Extern-Url $scheme://$host$request_uri;
proxy_set_header X-Extern-Domain $scheme://$host;
proxy_set_header X-User-Agent $http_user_agent;
proxy_set_header X-Public "1";
location / {
2023-10-15 16:38:30 +00:00
proxy_pass http://api-service/public/;
access_log off;
}
}