Welcome! Log In Create A New Profile

Advanced

Re: кеширование элементов дизайна

January 15, 2013 08:37AM
Реализовал задачу.
Вот такие конфиги получились:

#===========> nginx.conf <=============================================
user nginx;
worker_processes 4;

error_log /var/log/nginx/error.log warn; #debug;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

proxy_cache_path /var/cache/nginx/proxy_cache levels=1:2 keys_zone=static:32m inactive=15h max_size=64m;
proxy_temp_path /var/cache/nginx/proxy_temp 1 2;
proxy_ignore_headers Expires Cache-Control;
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;

sendfile on;
tcp_nopush on;

keepalive_timeout 65;

gzip on;
gzip_static on;
gzip_proxied any;
gzip_min_length 1100;
gzip_http_version 1.1;
gzip_buffers 4 8k;
gzip_comp_level 5;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;

include /etc/nginx/conf.d/*.conf;
}
#===========> nginx.conf <=============================================



#===========> default.conf <=============================================
server {
listen 80;
server_name localhost;

if ( $scheme = "http" ) {
rewrite ^/(.*)$ https://$host/$1 permanent;
}
}
#===========> default.conf <=============================================



#===========> ssl.conf <=============================================
# HTTPS server
server {
listen 443;
server_name localhost;

ssl on;
ssl_certificate /etc/nginx/ssl/cert.pem;
ssl_certificate_key /etc/nginx/ssl/cert.key;

ssl_session_timeout 5m;

ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

location ~^/domjs/ {
root /var/www/;
}

location ~^/.*\.(css|js|gif|jpg|png)$ {
proxy_pass http://192.168.1.250:8080;
proxy_set_header Host $host;
proxy_cache static;
proxy_cache_valid 60m;
#proxy_cache_valid 404 1m;
expires 5d;
}

location / {
proxy_pass http://192.168.1.250:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_ignore_client_abort on;
}
}
#===========> ssl.conf <=============================================
Subject Author Posted

кеширование элементов дизайна

bioargonaft December 26, 2012 08:40AM

Re: кеширование элементов дизайна

Михаил Монашёв December 26, 2012 10:54AM

Re: кеширование элементов дизайна

bioargonaft December 27, 2012 02:57AM

Re[2]: кеширование элементов дизайна

Михаил Монашёв December 27, 2012 04:18AM

Re: кеширование элементов дизайна

bioargonaft December 29, 2012 08:12AM

Re: кеширование элементов дизайна

bioargonaft January 09, 2013 03:51AM

Re: кеширование элементов дизайна

bioargonaft January 08, 2013 02:52PM

Re: кеширование элементов дизайна

Михаил Панфилов January 08, 2013 04:40PM

Re: кеширование элементов дизайна

bioargonaft January 09, 2013 02:30AM

Re: кеширование элементов дизайна

bioargonaft January 15, 2013 08:37AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 125
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready