Koel.conf: Difference between revisions

From FlowerHouseWiki
(Created page with "NGINX Koel Configuration: <syntaxhighlight lang="nginx" line> server { listen *:80; server_name audio.flowerhouse.at; root /var/www/koel/public;...")
 
mNo edit summary
 
Line 3: Line 3:
server {
server {
   listen          *:80;
   listen          *:80;
   server_name    audio.flowerhouse.at;
   server_name    _;
   root            /var/www/koel/public;
   root            /var/www/koel/public;
   index          index.php;
   index          index.php;

Latest revision as of 15:23, 2 August 2021

NGINX Koel Configuration:

server {
  listen          *:80;
  server_name     _;
  root            /var/www/koel/public;
  index           index.php;

  gzip            on;
  gzip_types      text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
  gzip_comp_level  9;

  location /media/ {
    internal;

    alias       $upstream_http_x_media_root;

    #access_log /var/log/nginx/koel.access.log;
    #error_log  /var/log/nginx/koel.error.log;
  }

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

  location ~ \.php$ {
    try_files $uri $uri/ /index.php?$args;

    fastcgi_param     PATH_INFO $fastcgi_path_info;
    fastcgi_param     PATH_TRANSLATED $document_root$fastcgi_path_info;
    fastcgi_param     SCRIPT_FILENAME $document_root$fastcgi_script_name;

    fastcgi_pass              unix:/run/php/php7.4-fpm.sock;
    fastcgi_index             index.php;
    fastcgi_split_path_info   ^(.+\.php)(/.+)$;
    fastcgi_intercept_errors  on;
    include                   fastcgi_params;
  }
}