74 lines
1.6 KiB
Plaintext
74 lines
1.6 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name app.nexxo.at 10.10.90.125;
|
|
|
|
root /var/www/html/public;
|
|
index index.php index.html;
|
|
|
|
client_max_body_size 20M;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
# Hauptrouting (Laravel)
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
location ^~ /videos/files/ {
|
|
alias /mnt/videos/;
|
|
|
|
types {
|
|
video/mp4 mp4;
|
|
image/jpeg jpg jpeg;
|
|
image/png png;
|
|
}
|
|
|
|
add_header Accept-Ranges bytes;
|
|
}
|
|
|
|
location ^~ /videos/thumbs/ {
|
|
alias /mnt/videos/thumbs/;
|
|
}
|
|
|
|
# PHP Handling
|
|
location ~ \.php$ {
|
|
try_files $uri =404;
|
|
|
|
fastcgi_pass app:9000;
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
}
|
|
|
|
# Security
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
|
|
# Optional: favicon / robots
|
|
location = /favicon.ico { access_log off; log_not_found off; }
|
|
location = /robots.txt { access_log off; log_not_found off; }
|
|
|
|
location ^~ /livewire {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
# Static files caching (optional, aber gut)
|
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js|woff|woff2|ttf|svg)$ {
|
|
try_files $uri =404;
|
|
expires 7d;
|
|
access_log off;
|
|
}
|
|
}
|
|
|
|
# Default Block (alles andere droppen)
|
|
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
return 444;
|
|
}
|