Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Simple question regarding server-config

$
0
0
Hi guys,

just a simple question. I've got..

-) a "cam_alarms.php" stored in /var/www/html/
-) and (.avi-)video-files stored in /var/www/html/rec/videos

Browsing the .php via http://[IP]:4444/cam_alarms.php works fine - it generates links to the above mentioned *.avi's, but when I click a link (e.g. http://[IP]:4444/rec/videos/videofile.avi) nginx throws back "404 Not Found".

Could you please have a look at the .conf below? Many thanks in advance & BR, Christian

server {
listen 4444;
server_name [IP];

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS off;
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
root /var/www/html;
}

location ~ \.(avi|mp4) {
root /var/www/html/rec/;
}
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>