51 lines
1.2 KiB
Cheetah
51 lines
1.2 KiB
Cheetah
|
error_log /dev/stdout info;
|
||
|
access_log /dev/stdout;
|
||
|
|
||
|
upstream php {
|
||
|
server 127.0.0.1:9000;
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 80;
|
||
|
|
||
|
server_name {{getenv "DOMAIN"}};
|
||
|
|
||
|
add_header X-Content-Type-Options nosniff;
|
||
|
add_header X-XSS-Protection "1; mode=block";
|
||
|
add_header X-Robots-Tag none;
|
||
|
add_header X-Download-Options noopen;
|
||
|
add_header X-Permitted-Cross-Domain-Policies none;
|
||
|
|
||
|
index index.php;
|
||
|
|
||
|
root /usr/share/webapps/cops/;
|
||
|
|
||
|
gzip on;
|
||
|
gzip_vary on;
|
||
|
gzip_comp_level 4;
|
||
|
gzip_min_length 256;
|
||
|
|
||
|
location /download/ {
|
||
|
rewrite ^/download/(\d+)/(\d+)/.*\.(.*)$ /fetch.php?data=$1&db=$2&type=$3 last;
|
||
|
rewrite ^/download/(\d+)/.*\.(.*)$ /fetch.php?data=$1&type=$2 last;
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
location ~ \.php$ {
|
||
|
include fastcgi_params;
|
||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||
|
fastcgi_param HTTPS on;
|
||
|
|
||
|
fastcgi_param modHeadersAvailable true;
|
||
|
fastcgi_param front_controller_active true;
|
||
|
fastcgi_pass php;
|
||
|
fastcgi_intercept_errors on;
|
||
|
}
|
||
|
|
||
|
location /calibre {
|
||
|
root /var/lib/cops;
|
||
|
internal;
|
||
|
}
|
||
|
}
|