Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user nginx;
- worker_processes 2;
- error_log /var/log/nginx/error.log;
- #error_log /var/log/nginx/error.log notice;
- #error_log /var/log/nginx/error.log info;
- 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;
- sendfile on;
- tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 75;
- tcp_nodelay on;
- gzip on;
- gzip_http_version 1.0;
- gzip_comp_level 2;
- gzip_proxied any;
- gzip_min_length 1100;
- gzip_buffers 16 8k;
- gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
- # Some version of IE 6 don't handle compression well on some mime-types,
- # so just disable for them
- gzip_disable "MSIE [1-6].(?!.*SV1)";
- # Set a vary header so downstream proxies don't send cached gzipped
- # content to IE6
- gzip_vary on;
- server_names_hash_bucket_size 64;
- reset_timedout_connection on;
- client_max_body_size 1G;
- # proxy settings
- 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;
- proxy_max_temp_file_size 0;
- 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;
- include /etc/nginx/sites-enabled/*;
- #
- # The default server
- #
- server {
- listen 80;
- server_name _;
- #charset koi8-r;
- #access_log logs/host.access.log main;
- location / {
- root /home/username/public_html;
- index index.html index.htm index.php;
- }
- error_page 404 /404.html;
- location = /404.html {
- root /home/username/public_html;
- }
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /home/username/public_html;
- }
- # proxy the PHP scripts to Apache listening on 127.0.0.1:80
- #
- location ~ \.php$ {
- proxy_pass http://127.0.0.1:8080;
- index index.php;
- }
- # 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;
- #}
- }
- # Load config files from the /etc/nginx/conf.d directory
- include /etc/nginx/conf.d/*.conf;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement