#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /home/hien/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/passenger-5.0.27;
passenger_ruby /home/hien/.rbenv/versions/2.2.3;
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 81;
server_name 192.168.100.10;
root /home/hien/rails_projects/childfoot/peco_blog1/public;
passenger_enabled on;
passenger_ruby /home/hien/.rbenv/versions/2.2.3;
#charset koi8-r;
client_max_body_size 10M;
client_body_buffer_size 512k;
#config nginx zip
location ~ ^/assets/ {
gzip_static on;
add_header Cache-Control "public";
expires 4w;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_disable "MSIE [1-6]\.";
gzip_comp_level 6;
gzip_types application/javascript application/x-javascript text/javascript text/css;
}
location ~* \.(?:css)$ {
expires 15d;
access_log off;
add_header Cache-Control "public";
}
location ~* \.(?:flash)$ {
expires 30d;
access_log off;
add_header Cache-Control "public";
}
location ~* \.(?:gif|jpe?g|png|js)$ {
expires 10d;
access_log off;
add_header Cache-Control "public";
}
location / {
#root html;
#index index.html index.htm;
root /home/hien/rails_projects/childfoot/peco_blog1/public;
index app/views/home/index.html.haml;
expires 10d;
access_log off;
add_header Cache-Control "public";
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
Last active
June 13, 2016 04:09
-
-
Save hiendinhngoc/3b7efcd21737b23ffd1082f2b566406a to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment