Welcome! Log In Create A New Profile

Advanced

Re: auth_basic

March 31, 2010 04:41AM
Апача нет. 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;
}
}
}
}
Subject Author Posted

auth_basic

Kernel_panic March 31, 2010 04:02AM

Re: auth_basic

hg_04 March 31, 2010 04:29AM

Re: auth_basic

Olexander Shtepa March 31, 2010 04:32AM

Re: auth_basic

Kernel_panic March 31, 2010 04:41AM

Re: auth_basic

Kernel_panic April 03, 2010 07:55AM

Re: auth_basic

Kernel_panic April 03, 2010 08:02AM

Re: auth_basic

Kernel_panic April 20, 2010 06:16AM

Re: auth_basic

Sergey Shepelev June 14, 2010 12:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready