สิ่งที่เกิดขึ้นคือโครงการ GLPI ไม่โหลดไฟล์ (js, css, php ฯลฯ)
URL ท้องถิ่นคือ http://localhost/glpi-grupo/แต่ไฟล์ทั้งหมดใน Elements ขาดหายไปในไฟล์ /glpi-กลุ่ม แบบนี้: http://localhost/style.css

ฉันต้องบังคับให้โหลดด้วยไดเร็กทอรีย่อย /glpi-กลุ่ม
ฉันใช้ Nginx และ Traefik ทั้งหมดในคอนเทนเนอร์ Docker
กฎ Traefik ของฉัน:
traefik.frontend.rule: โฮสต์: localhost; PathPrefixStrip:/glpi-grupo
การกำหนดค่า Nginx ของฉัน:
เซิร์ฟเวอร์ {
ฟัง 80;
ดัชนี index.php index.html;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
รูท /var/www/html;
ที่ตั้ง / {
try_files $uri $uri/ /index.php$is_args$args;
}
ตำแหน่ง ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
รวม fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SERVER_NAME $โฮสต์;
fastcgi_index index.php;
fastcgi_pass glpi-grupo:9000;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}