ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 404 проблема с stub status


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: 404 проблема с stub status
  • From: "whocarez" <nginx-forum@xxxxxxxx>
  • Date: Mon, 03 Oct 2011 10:07:48 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Date:Sender:From:References:In-Reply-To:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=fk93LJKLTkPoViYwvuIRWYOBj1mXjzRb4NHZ209KU08=; b=Js2M0b5zSEWe9sp9BlGwA2OjWQeZEbRSjDOtDHQQNfnohvQ4e5eCBtzbPC8/bsT6JAmSMiqe77TPOeyuhVpMRay0G5yUyDiPIN4alPCa03MNL48jP61XGVtFyoNEjMEa;
  • In-reply-to: <2610568740.20111002165409@xxxxxxxxxxxxx>
  • References: <2610568740.20111002165409@xxxxxxxxxxxxx>

Здравствуйте, хорошо,
вот тут nginx.conf

-----------------------
user  www-data www-data;                                                
                                                                      
worker_processes  1;                                                    
                                                                      
error_log  /var/log/nginx/error.log;                                    
                                                                      
                                                                        
                                                                

pid        /var/run/nginx.pid;
events {
    worker_connections  1024;
}
http {
#adminpage xcache
    include       mime.types;
    include     fastcgi.conf;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
gzip  on;
gzip_static       on;
gzip_http_version               1.1;
gzip_vary                       on;
gzip_comp_level                 1;
gzip_buffers                    16 8k;
gzip_min_length                 1000;
gzip_types                      text/plain text/css application/json
application/x-javascript text/xml application/xml application/xml+rss
text/javascript;

expires off;

 # configure log format
 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 runo '$remote_addr - $remote_user [$time_local] '
                  '"$request" $status  $body_bytes_sent "$http_referer"
'
                  '"$http_user_agent" "$http_x_forwarded_for"';



include /etc/nginx/seiten/hauptseite.conf;

}
------------
вот и hauptseite.conf

------------
server {
        listen       85.214.xxx.yyy:80;
        server_name  hauptseite.com www.hauptseite.com;
        charset utf-8;
root                    /dev/shm/hauptseite;
index                    index.php index.html;
error_log  /var/log/nginx/hauptseite-error.log error;
error_page  404 500 502 503 504             /index.php;


if ($host != 'hauptseite.com' ) {
    rewrite  ^/(.*)$  http://hauptseite.com/$1  permanent;
} 





if (!-e $request_filename) {


        rewrite ^/page/([0-9]+)/?$ /?page=$1 last;

        rewrite ^/profile/([^/]+)/([^/]+)/page/([0-9]+)/?$
/profile.php?id=$1&tab=$2&page=$3 last;
        rewrite ^/profile/([^/]+)/page/([0-9]+)/?$
/profile.php?id=$1&page=$2 last;
        rewrite ^/profile/([^/]+)/([^/]+)$ /profile.php?id=$1&tab=$2
last;
        rewrite ^/profile/([^/]+)$ /profile.php?id=$1 last;
        rewrite ^/profile/$ /profile.php last;

        rewrite ^/rss/forum/([^/]+)/topics/?$ /rss.php?forum=$1&topics=1
last;
        rewrite ^/rss/forum/([^/]+)/?$ /rss.php?forum=$1 last;
        rewrite ^/rss/profile/([^/]+)$ /rss.php?profile=$1 last;
        rewrite ^/rss/tags/([^/]+)/topics/?$ /rss.php?tag=$1&topics=1
last;
        rewrite ^/rss/tags/([^/]+)$ /rss.php?tag=$1 last;
        rewrite ^/rss/topic/([^/]+)$ /rss.php?topic=$1 last;
        rewrite ^/rss/view/([^/]+)$ /rss.php?view=$1 last;
        rewrite ^/rss/topics/?$ /rss.php?topics=1 last;
        rewrite ^/rss/?$ /rss.php last;

        rewrite ^/tags/([^/]+)/page/([0-9]+)/?$ /tags.php?tag=$1&page=$2
last;
        rewrite ^/tags/([^/]+)$ /tags.php?tag=$1 last;
        rewrite ^/tags/?$ /tags.php last;

        rewrite ^/view/([^/]+)/page/([0-9]+)/?$
/view.php?view=$1&page=$2 last;
        rewrite ^/view/([^/]+)$ /view.php?view=$1 last;

        # forums
        rewrite ^/([^/]+)/page/([0-9]+)/?$ /forum.php?id=$1&page=$2
last;
        rewrite ^/([^/]+)/$ /forum.php?id=$1 last; # tailed '/' is
mandatory for forum URIs! Props: Mohta

        # topics
        rewrite ^/([^/]+)/([^/]+)/page/([0-9]+)/?$
/topic.php?id=$2&page=$3 last;
        rewrite ^/([^/]+)/([^/\.]+)(/)?$ /topic.php?id=$2 last;
        rewrite ^/ /index.php last;
#        rewrite ^/([^/\.]+)$ /topic.php?id=$1 last;
        }

       location /status {
            stub_status on;
            access_log   off;
            allow 127.0.0.1;
            deny all;
        }




location ~* \.(?:ico|jpe?g|gif|bmp|png|js|css)$ {
expires         30d;
access_log off;
}


location ~* (?!\.(ico|jpg|jpeg|gif|bmp|png|css|js))$ {
        expires off;
        access_log  /var/log/nginx/hauptseite-access.log main;

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}

}


}

---------------

команда это как уже сказал:
-----
GET hautpseite.com/status
----

nginx -V

----
nginx: nginx version: nginx/1.0.8
nginx: configure arguments: --with-http_gzip_static_module
--with-openssl=/usr/include --with-http_stub_status_module
--http-proxy-temp-path=/dev/shm/nginx/proxy_temp
--http-fastcgi-temp-path=/dev/shm/nginx/fastcgi_temp
--http-uwsgi-temp-path=/dev/shm/nginx/uwsgi_temp
--http-scgi-temp-path=/dev/shm/nginx/scgi_temp
--http-client-body-temp-path=/dev/shm/nginx/client_body_temp
--http-log-path=/var/log/nginx/access.log
--error-log-path=/var/log/nginx/error.log
--conf-path=/etc/nginx/nginx.conf --user=www-data --group=www-data
----

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,216183,216215#msg-216215

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.