2015-12-16 15:40:08 +00:00
|
|
|
server {
|
2015-12-16 15:42:11 +00:00
|
|
|
listen *:8080;
|
2016-02-03 15:44:47 +00:00
|
|
|
server_name koel.dev;
|
2015-12-16 15:42:11 +00:00
|
|
|
root /var/www/koel;
|
|
|
|
index index.php;
|
2015-12-16 15:40:08 +00:00
|
|
|
|
|
|
|
# Deny access to dotfiles
|
|
|
|
location ~ /\. {
|
2016-02-03 15:44:47 +00:00
|
|
|
deny all;
|
2015-12-16 15:40:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Deny access to framework directories
|
2016-02-18 12:51:58 +00:00
|
|
|
location ~ /(app|bootstrap|config|database|resources|storage|tests|vendor|node_modules)/ {
|
2016-02-03 15:44:47 +00:00
|
|
|
deny all;
|
2015-12-16 15:40:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location /media/ {
|
|
|
|
internal;
|
|
|
|
|
|
|
|
# A 'X-Media-Root' should be set to media_path settings from upstream
|
2016-02-03 15:44:47 +00:00
|
|
|
alias $upstream_http_x_media_root;
|
2015-12-16 15:40:08 +00:00
|
|
|
|
2016-02-03 15:44:47 +00:00
|
|
|
#access_log /var/log/nginx/koel.access.log;
|
|
|
|
#error_log /var/log/nginx/koel.error.log;
|
2015-12-16 15:40:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
2016-02-03 15:44:47 +00:00
|
|
|
try_files $uri $uri/ /index.php?$args;
|
2015-12-16 15:40:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location ~ \.php$ {
|
2015-12-16 15:42:11 +00:00
|
|
|
try_files $uri $uri/ /index.php?$args;
|
2015-12-16 15:40:08 +00:00
|
|
|
|
2016-02-03 15:44:47 +00: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 15:40:08 +00:00
|
|
|
|
2016-02-03 15:44:47 +00: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 15:40:08 +00:00
|
|
|
}
|
|
|
|
}
|