auth_basic
Kernel_panic
nginx-forum на nginx.us
Ср Мар 31 12:41:06 MSD 2010
Апача нет. FastCGI стоит. Два раза не прописывал.
user http;
worker_processes 2;
timer_resolution 100ms;
worker_priority -5;
error_log /var/log/nginx/error.log notice;
#error_log /var/log/httpd/error.log notice;
#error_log logs/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
http {
include blockips.conf;
limit_zone one $binary_remote_addr 10m;
include 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"';
log_format download '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$http_range" "$sent_http_content_range"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
client_max_body_size 10m;
tcp_nodelay on;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
client_header_buffer_size 4k;
large_client_header_buffers 4 4k;
output_buffers 8 64k;
postpone_output 1460;
keepalive_timeout 75 20;
#gzip on;
server {
listen 80;
server_name artemovski.ru www.artemovski.ru;
charset UTF-8;
location /awstats {
root /srv/http/awstats/cgi-bin;
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_NAME /awstats.pl;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_buffers 8 16K;
include fastcgi_params;
allow 127.0.0.1;
deny all;
}
location /awstatsclasses/ {
alias /srv/http/awstats/classes/;
}
location /awstatscss/ {
alias /srv/http/awstats/css/;
}
location /awstatsicons/ {
alias /srv/http/awstats/icon/;
}
location / {
if ( !-e $request_filename ) { # rewrite ^/wordpress(.*)[^/]$ /wordpress$1/ break; }
rewrite ^ /wordpress/index.php last;
}
limit_conn one 10;
limit_rate_after 1m;
#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;
root /srv/http/;
index index.php index.html;
}
location ~ \.php$ {
root /srv/http;
fastcgi_pass unix:/var/run/php-fcgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/http$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_read_timeout 180;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
include fastcgi_params;
}
location /files {
limit_rate 40k;
expires 14d;
root /media4;
autoindex on;
auth_basic "Welcome, please enter your login and password here.";
auth_basic_user_file /etc/nginx/conf/htpasswd;
access_log /var/log/nginx/files.log download;
autoindex_localtime on;
location ~* \.(jpg|jpeg|avi|mp3|mpg|txt|png|tar|bz2|patch|wmv|mp4|mkv)$ {
expires 30d;
}
}
}
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,69689,69704#msg-69704
Подробная информация о списке рассылки nginx-ru