Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FastCGI Perl + Nginx
- To: nginx-ru@xxxxxxxxx
- Subject: FastCGI Perl + Nginx
- From: äÍÉÔÒÉÊ ìÑÌÀÅ× <dmitriy@xxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2012 13:11:22 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyalyuev.pp.ua; s=mail; h=mime-version:sender:x-originating-ip:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=D26ie3Y7QajimP+OXGJlDmU9fsxh8LmZXaaJh5CdSm8=; b=DO3WF8xC8Bj2MvI7ZD7W5zkHgqZjOC2t60KLVQIde0bzcCXF69lpGbs/nEQOUyEKdP m+dV88Fhf3Es4F9fn64HxoGbKbr5Gdv7BEtJ5ZvFyqBVdSMqdyCuDjo4ByJxGHQ+ANfk Aln97JEkwOaWe70RTtymxKY/SvwIVjatZqY3U=
îÅ ÐÏÊÍÕ × ÞÅÍ ÐÒÏÂÌÅÍÁ. íÏÖÅÔ ÂÙÔØ Õ×ÁÖÁÅÍÙÊ All ÐÏÄÓËÁÖÅÔ?
ðÙÔÁÀÓØ ÐÒÉËÒÕÔÉÔØ Foswiki Ë Nginx ÂÅÚ ÉÎÄÅÊÃÁ:
server { š šlisten 80; š šserver_name wiki.localdomain;
š šroot /opt/data/wiki;
š šerror_log /tmp/error.log; š šaccess_log /tmp/access.log;
š šif ($args ~* "skin|raw|template|maxrev|minrev|currev") {
š š š š rewrite ^(.*)$ /bin/view/$1?; š š}
š šrewrite ^/bin/view(.*)$ / redirect;
š šrewrite ^(/Help)$ /bin/view/Help last; š šrewrite ^/(Main|System|Sandbox|Help)(/[A-Z].*)$ /bin/view/$1$2 last;
š šrewrite ^/([A-Z].*) /bin/view/Help/$1 last; š šrewrite ^/(Help)(/[A-Z].*)$ $2; š šrewrite ^/([A-Z].*) /bin/view/Help/$1 last; š šrewrite ^/$ /bin/view/Help last;
š šlocation ~ /bin/view/(System|System/.*|Main|Main/.*|Sandbox|Sandbox/.*) { š š š š auth_basic š š š š š š š "Enter your WikiName. (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.";
š š š š auth_basic_user_file š š /opt/data/wiki/data/.htpasswd; š š š š gzip off; š š š š fastcgi_pass š š š š š š unix:/var/run/wiki/fcgi.sock; š š š š fastcgi_split_path_info š^(/bin/\w+)(.*); š# Yes, one of the above links had this wrong
š š š š fastcgi_param š š š š š šSCRIPT_FILENAME /opt/data/wiki/$fastcgi_script_name; š š š š fastcgi_param š š š š š šPATH_INFO š š š $fastcgi_path_info; š š š š fastcgi_param š š š š š šSCRIPT_NAME š š $fastcgi_script_name;
š š š š fastcgi_param š š š š š šREMOTE_USER š š $remote_user; š š š š include fastcgi_params; š š}
š šlocation / { š š š š limit_except GET POST { deny all; }
š š}
š šlocation ~* /pub/.*\.(s?p?html?|php3?|pl|py|cgi)$ { š š š š types {} š š š š default_type application/octet-stream; š š}
š šlocation ~ /bin/configure {
š š š š allow all; š # add allow statements only for administrative IPs! š š š š deny all; š š š š gzip off; š š š š fastcgi_pass š š š š š š šunix:/var/run/wiki/configure.sock; š š š š š š š š š š# $socket_path is not in nginx, see number 2 above
š š š š fastcgi_split_path_info š ^(/bin/configure)(.*); š# Yes, one of the above links had this wrongš š š š š fastcgi_param š š š š š š SCRIPT_FILENAME š /opt/data/wiki/bin/configure; š# $configure_script is not in nginx, see number 2 above
š š š š fastcgi_param š š š š š š PATH_INFO š š š š $fastcgi_path_info; š š š š fastcgi_param š š š š š š SCRIPT_NAME š š š $fastcgi_script_name; š š š š fastcgi_param š š š š š š REMOTE_USER š š š $remote_user;
š š š š include fastcgi_params; š š}
š šlocation ~ /bin/.* { š š š š gzip off; š š š š fastcgi_pass š š š š š š unix:/var/run/wiki/fcgi.sock; š š š š# $fcgi_socket comes from #3 above
š š š š fastcgi_split_path_info š^(/bin/\w+)(.*); š# Yes, one of the above links had this wrongš š š š š fastcgi_param š š š š š šSCRIPT_FILENAME /opt/data/wiki/$fastcgi_script_name; š š š š fastcgi_param š š š š š šPATH_INFO š š š $fastcgi_path_info;
š š š š fastcgi_param š š š š š šSCRIPT_NAME š š $fastcgi_script_name; š š š š fastcgi_param š š š š š šREMOTE_USER š š $remote_user; š š š š include fastcgi_params; š š}
š šlocation ~ (^/lib|^/data|^/locale|^/templates|^/tools|^/work) š{ deny all; } }
ôËÎÉÔÅ ÎÏÓÏÍ ÎÅÒÁÚÕÍÎÏÇÏ ÐÌÚ. :)
-- ó Õ×ÁÖÅÎÉÅÍ, äÍÉÔÒÉÊ ìÑÌÀÅ× ÔÅÌ. +380 (66) 532-29-62 ÷ÓÅ ËÏÎÔÁËÔÙ ÄÌÑ Ó×ÑÚÉ ÎÁ http://lyalyuev.info
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|