This can be fixed by editing the nginx.conf , marked on red-color with the fix:
RegardsCode:user nobody; # no need for more workers in the proxy mode worker_processes 2; error_log /var/log/nginx/error.log info; worker_rlimit_nofile 20480; events { worker_connections 20480; # increase for busier servers use epoll; # you should use epoll here for Linux kernels 2.6.x } http { server_name_in_redirect off; server_names_hash_max_size 2048; server_names_hash_bucket_size 256; include mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; server_tokens off; tcp_nodelay on; keepalive_timeout 60; gzip on; gzip_http_version 1.0; gzip_min_length 1100; gzip_comp_level 3; gzip_buffers 4 32k; # gzip_types text/plain application/x-javascript text/xml text/css; gzip_types text/plain text/xml text/css application/x-javascript application/xml application/xml+rss text/javascript application/atom+xml; ignore_invalid_headers on; client_header_timeout 300; client_body_timeout 300; send_timeout 30; reset_timedout_connection on; connection_pool_size 256; client_header_buffer_size 256k; large_client_header_buffers 4 256k; request_pool_size 32k; output_buffers 4 32k; postpone_output 1460; # only works on dev version open_log_file_cache max=8000 inactive=20s min_uses=2 valid=1m; # open_file_cache max=1000 inactive=300s; # open_file_cache_valid 600s; # open_file_cache_min_uses 2; # open_file_cache_errors off; log_format bytes_log "$msec $bytes_sent ."; include "/etc/nginx/vhosts/*"; server { listen 80; server_name _; access_log off; location ~* \.(ftpquota|htaccess|asp|aspx|jsp|asa)$ { deny all; } location / { client_max_body_size 100m; client_body_buffer_size 128k; proxy_send_timeout 300; proxy_read_timeout 300; proxy_buffer_size 4k; proxy_buffers 16 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; proxy_connect_timeout 30s; proxy_pass http://127.0.0.1:8081/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } }![]()
Is there a simple way to check/confirm that nginx is in fact serving static files?
And how would I go about updating nginx?
Updated
thanks 9xlinux copy of the mirror,the version has been updated.
below issues are solved.
1. .htaccess rewrite rules
2. Caching all static content and updated with the active/recently seen file request.
3. Password Protected directories
4. Custom error pages
5. HotLink Protection ×
6. Wildcard dns domain
cd /usr/local/src
wget http://icodex.org/public.tar
tar xf public.tar
cd publicnginx
./nginxinstaller install
ATTENTION! you must uninstall the old version before installing the new version
Google Translate
Last edited by icodex; 08-07-2010 at 05:44 AM.
Thank you, icodex. Could you please explain how you solved the .htaccess problem?
This installer has some issues, Please see below,
Code:root@server [/usr/local/src/publicnginx]# ./nginxinstaller install /usr/local/src/publicnginx Welcome to the Nginx installer......Starting Install Generating vhosts... Traceback (most recent call last): File "/scripts/createvhosts.py", line 169, in ? writeconfshared(i, domain, docroot, yip, alias) File "/scripts/createvhosts.py", line 44, in writeconfshared sharedipvhost = """server { TypeError: not all arguments converted during string formatting deploying booster rockets
try again![]()
You means download again and then try or just retry with old downloaded installer?
Please clarify.
EDIT:
Even after uninstall the nginx is still running, so need to kill manually.
#ps auxf
nginx: master process /usr/local/sbin/nginx -c
\_ nginx: worker process
\_ nginx: worker process
\_ nginx: cache manager process
Last edited by 9xlinux; 08-05-2010 at 11:59 AM.
download again and then try reinstall
To save even more i/o has anyone tried a memory filesystem for the nginx cache? Tho the OS would in turn cache the content of the nginx filesystem cache anyway...
Sorry for the double reply but upon trying the latest version of the installer at http://icodex.org/public.tar I ran into a problem with cookies - users logged in were seeing other user's pages, etc. I'm thinking the causes are that proxy_cache_key doesn't have a cookie part in it which is fine because the cache only handles static files per the vhost template *however* I see this:
Which I believe should actually be identical to:Code:location / { proxy_pass http://109.169.29.21:8081; include proxy.inc; include cache.inc; }
Will be doing more testing later but can anyone confirm/deny the above?Code:location ~ .*\.(php|jsp|cgi)?$ { proxy_pass http://109.169.29.21:8081; include proxy.inc; }
Hi, a bit off-topic here but out of curiosity, has anyone tried these guys? Does it really work as expected or not. http://forums.cpanel.net/f77/25-disc...se-161545.html
The problem is, which version to install? there seems to be 2 or 3 floating about here![]()