sudo cat /etc/nginx/sites-available/deb.site.com
server {
listen 80;
server_name www.deb.site.com deb.site.com;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 4 32k;
root /var/www/FRL/yii_proj;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
error_page 405 = $uri;
}
location ~* \.php$ {
include fastcgi_params;
try_files $uri $uri/ /index.php?$args;
fastcgi_pass 127.0.0.1:9007;
}
location ~ /(protected|framework|nbproject) {
deny all;
access_log off;
log_not_found off;
}
location ~ /themes/\w+/views {
deny all;
access_log off;
log_not_found off;
}
location ~ \.(js|css|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}
location ~* \.(?:ico|css|js)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
}
server {
listen 80;
server_name www.deb.site.com deb.site.com;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 4 32k;
root /var/www/FRL/yii_proj;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
error_page 405 = $uri;
}
location ~* \.php$ {
include fastcgi_params;
try_files $uri $uri/ /index.php?$args;
fastcgi_pass 127.0.0.1:9007;
}
location ~ /(protected|framework|nbproject) {
deny all;
access_log off;
log_not_found off;
}
location ~ /themes/\w+/views {
deny all;
access_log off;
log_not_found off;
}
location ~ \.(js|css|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}
location ~* \.(?:ico|css|js)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
}
Comments
Post a Comment