server {
    listen 80;
    server_name test.glocalis.com;

    root /opt/aicouncil/workspace/code;
    index index.html calculator.html;

    # OCR Viewer - redirect /ocr-viewer/ to translynx/ocr-viewer/
    location /ocr-viewer/ {
        alias /opt/aicouncil/workspace/code/translynx/ocr-viewer/;
        index index.html;
        try_files $uri $uri/ /ocr-viewer/index.html =404;
    }

    # Calculator - serves calculator.html
    location /calculator/ {
        alias /opt/aicouncil/workspace/code/calculator/;
        index calculator.html;
        try_files $uri $uri/ /calculator/calculator.html =404;
    }

    # Also serve translynx directory directly
    location /translynx/ {
        autoindex on;
        try_files $uri $uri/ =404;
    }

    # Root location
    location / {
        autoindex on;
        try_files $uri $uri/ =404;
    }

    # Logging
    access_log /var/log/nginx/test.glocalis.com.access.log;
    error_log /var/log/nginx/test.glocalis.com.error.log;
}
