2015-12-16 23:40:08 +08:00
|
|
|
server {
|
2016-07-08 01:06:06 +08:00
|
|
|
listen *:80;
|
|
|
|
server_name koel.dev;
|
2020-09-12 17:01:48 +02:00
|
|
|
root /var/www/koel/public;
|
2016-07-08 01:06:06 +08:00
|
|
|
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;
|
2016-08-09 23:36:23 -04:00
|
|
|
gzip_comp_level 9;
|
2015-12-16 23:40:08 +08:00
|
|
|
|
2023-02-25 10:36:17 -05:00
|
|
|
send_timeout 3600;
|
2023-04-17 00:10:34 +02:00
|
|
|
client_max_body_size 50M;
|
2023-02-25 10:36:17 -05:00
|
|
|
|
2022-07-28 12:55:19 +02:00
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ /index.php?$args;
|
|
|
|
}
|
|
|
|
|
2015-12-16 23:40:08 +08:00
|
|
|
location /media/ {
|
|
|
|
internal;
|
|
|
|
|
2016-02-03 23:44:47 +08:00
|
|
|
alias $upstream_http_x_media_root;
|
2015-12-16 23:40:08 +08:00
|
|
|
|
2016-02-03 23:44:47 +08:00
|
|
|
#access_log /var/log/nginx/koel.access.log;
|
|
|
|
#error_log /var/log/nginx/koel.error.log;
|
2015-12-16 23:40:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
location ~ \.php$ {
|
2015-12-16 23:42:11 +08:00
|
|
|
try_files $uri $uri/ /index.php?$args;
|
2015-12-16 23:40:08 +08:00
|
|
|
|
2016-02-03 23:44:47 +08:00
|
|
|
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;
|
2015-12-16 23:40:08 +08:00
|
|
|
|
2016-02-03 23:44:47 +08:00
|
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
fastcgi_intercept_errors on;
|
|
|
|
include fastcgi_params;
|
2015-12-16 23:40:08 +08:00
|
|
|
}
|
|
|
|
}
|