Welcome! Log In Create A New Profile

Advanced

NGINX - php serveed, but js not found - Docker Installation

Posted by NadirHH 
NGINX - php serveed, but js not found - Docker Installation
September 21, 2024 01:55PM
Ich habe einen Docker Container mit einer NGINX Installation und einer PHP App.

Ich kann auf http://127.0.0.1:8080/inc/test.php zugreifen.

Aber ein Zugriff auf http://127.0.0.1:8080/inc/jquery-3.7.1.min.js wird mit 404 beantwortet.

Beide Dateien liegen im gleichen Verzeichnis.

Datei default.conf:

server {
listen 80;
server_name localhost;
root /var/www/html/public;
index index.php;

location ~ .\.php$ {
fastcgi_pass kanban:9000;
fastcgi_index index.php;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location / {
try_files $uri $uri/ =404;
}

# location ~* \.css$ {
# alias /var/www/html/public/css;
# add_header Content-Type text/css;
# expires 30d;
# try_files $uri =500;
# }
}

Ich bin ratlos.

Irgendeine Idee ?


Nadir
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready