Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user www;
- worker_processes 8;
- pid /var/run/nginx.pid;
- error_log /var/log/nginx/error_log;
- events {
- worker_connections 1024;
- }
- http {
- include /etc/nginx/mime.types;
- #include config for virtual hosts
- #include /etc/nginx/sites/*;
- default_type application/octet-stream;
- server_names_hash_max_size 1024;
- server_names_hash_bucket_size 1024;
- access_log /var/log/nginx/access_log;
- server {
- error_log /var/log/nginx/nginx_global_error;
- access_log /var/log/nginx/nginx_global_access;
- listen 80;
- #server_name _;
- location ~.*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 24h;
- if (!-f $request_filename) {
- break;
- proxy_pass http://127.0.0.1:8000;
- }
- }
- location ~.*\.(js|css)?$
- {
- expires 1h;
- if (!-f $request_filename) {
- break;
- proxy_pass http://127.0.0.1:8000;
- }
- }
- location / {
- proxy_pass http://127.0.0.1:8000;
- 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 8k;
- proxy_connect_timeout 90;
- proxy_send_timeout 90;
- #proxy_read_timeout 90;
- #proxy_buffer_size 4k;
- #proxy_busy_buffers_size 64k;
- proxy_temp_file_write_size 64k;
- }
- #location ~ .*\.(php|php5)?$
- #{
- # #fastcgi_pass unix:/tmp/php-cgi.sock;
- # fastcgi_pass 127.0.0.1:9000;
- # fastcgi_index index.php;
- # include fastcgi_params;
- #}
- #location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- #{
- # expires 24h;
- #}
- #location ~ .*\.(js|css)?$
- #{
- # expires 1h;
- #}
- }
- #server {
- # listen 80;
- #
- # server_name localhost;
- #
- # charset utf-8;
- #
- # location / {
- #root /home/lpfan;
- #index index.php index.html index.htm;
- ######apache backend configuration######
- #proxy_pass http://127.0.0.1:8080/; #ip and port for listning apache
- #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 10m;
- # }
- #
- # error_page 404 /404.html;
- #
- # location = /404.html {
- # root /usr/share/nginx/html;
- # }
- # redirect server error pages to the static page /50x.html
- #
- # error_page 500 502 503 504 /50x.html;
- # location = /50x.html {
- # root /usr/share/nginx/html;
- # }
- # location ~ \.php$ {
- # root html;
- # fastcgi_pass 127.0.0.1:9000;
- # fastcgi_index index.php;
- # fastcgi_param SCRIPT_FILENAME /home/lpfan$fastcgi_script_name;
- # include fastcgi_params;
- # }
- #}
- # 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;
- # server_name localhost;
- # ssl on;
- # ssl_certificate cert.pem;
- # ssl_certificate_key cert.key;
- # ssl_session_timeout 5m;
- # ssl_protocols SSLv2 SSLv3 TLSv1;
- # ssl_ciphers HIGH:!aNULL:!MD5;
- # ssl_prefer_server_ciphers on;
- # location / {
- # root html;
- # index index.html index.htm;
- # }
- #}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement