Как настроить алиасы для ресурсов?

Мои ресурсы находятся по адресу

/var/www/snipeit/resources/assets/css
/var/www/snipeit/resources/assets/js
/var/www/snipeit/resources/assets/less

Мой конфиг

server {
    listen 80;
    server_name 192.168.88.242;
    root /var/www/snipeit;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.php;

    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~* \.(css|js|gif|jpe?g|png)$ {
        expires 168h;
    }


    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

Когда захожу по урлу 192.168.88.242/server.php, то у меня сервер обращается по урлу /var/www/snipeit/server.php/js/dist/bootstrap-table.js за ресурсами.

Как правильно настроить алиасы?


Ответы (0 шт):