45 lines
No EOL
1.3 KiB
Text
45 lines
No EOL
1.3 KiB
Text
server {
|
|
listen 80;
|
|
server_name yourpiratebay.site;
|
|
|
|
root /home/oldpiratebay/src/www;
|
|
index index.php;
|
|
|
|
set $yii_bootstrap "index.php";
|
|
|
|
charset utf-8;
|
|
gzip on;
|
|
gzip_comp_level 3;
|
|
gzip_types text/plain text/css text/javascript application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss;
|
|
|
|
location / {
|
|
index index.html $yii_bootstrap;
|
|
try_files $uri $uri/ /$yii_bootstrap?$args;
|
|
}
|
|
|
|
location ~ \.(js|css|png|jpg|gif|swf|ico|svg)$ {
|
|
fastcgi_hide_header Set-Cookie;
|
|
|
|
open_file_cache max=10000 inactive=14d;
|
|
open_file_cache_errors on;
|
|
open_file_cache_min_uses 3;
|
|
open_file_cache_valid 1m;
|
|
output_buffers 1 2m;
|
|
|
|
expires 14d;
|
|
}
|
|
|
|
location ~* \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
|
set $fsn /$yii_bootstrap;
|
|
if (-f $document_root$fastcgi_script_name){
|
|
set $fsn $fastcgi_script_name;
|
|
}
|
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_param PATH_TRANSLATED $document_root$fsn;
|
|
fastcgi_param HTTPS $https_value;
|
|
}
|
|
} |