Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: правила rewrite для SilverStr ipe
- To: nginx-ru@xxxxxxxxx
- Subject: Re: правила rewrite для SilverStr ipe
- From: Dmitry Belitsky <dmitry.belitsky@xxxxxxxxx>
- Date: Tue, 12 May 2009 13:26:59 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=1UySxLmj+6RVNnRskwjk3JMXjGr7lmU9or7jSpHvm8U=; b=Wj/iv2XW2q2zQe97pD06r9AB+lvodJyBE6QpoV2hFO8GOYT1hlAzOaNwJmPDsKdOjX Ziew4CYJLiw6mCLUz4lfTvF/xSrrygT0jAbkFJjuBuxPIhkDpBrC7x29z+4+JEqzhkSS fG5rvBHLmHpjZeGKHFmCMK+62gHpEO4CESUr8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=Y4w27ctBtoctwjHdYtS6WtlSwuwXXW67Zi/gqT7HC50HdFCMseFYtLBkx5u3cXWCHZ 4RxDhmp5V5OXbSlJnODOot3dEHhCEwPVFRwFc6KN/2BbvT4/ho9Xm4uliIKzt1cE/kcG F3uyjLfWL8DeKVrTXlrvwNa5+WBpUZ6qlL044=
- In-reply-to: <20090512060852.GF47175@xxxxxxxxxxxxx>
- References: <25663410-C7CB-4B0A-ADF5-7A0B80A818E2@xxxxxxxxx> <20090512060852.GF47175@xxxxxxxxxxxxx>
Спасибо за помощь!
Сделал как вы написали, получаю 403 Forbidden,
что проверять?
Конфиг:
user www-data;
worker_processes 5;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
#server_name localhost;
location / {
root html;
index index.php index.html index.htm;
}
location /ss231 {
error_page 404 = /ss231/sapphire/main.php?url=$uri&$args;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
# root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts
$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
}
}
On 12 Тра 2009, at 09:08, Igor Sysoev wrote:
On Mon, May 11, 2009 at 10:53:12PM +0300, Dmitry Belitsky wrote:
Уважаемая рассылка,
помогите переписать правила апача.
в .htaccess написано
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
RewriteEngine On
RewriteBase /ss231
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|
(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END ###
как это переписать для nginx?
Поставил nginx, php-fpm.
Теперь разбираюсь как это все /
допилить напильником/ запустить.
Возможно, так:
location /ss231/ {
error_page 404 = /ss231/sapphire/main.php?url=$uri&$args;
}
location ~ \.ss$ {
allow 127.0.0.1;
deny from all;
}
location ~ \.(gif|jpg|png|css|js)$ {
}
location ~ \.php$ {
fastcgi_pass ...;
}
--
Игорь Сысоев
http://sysoev.ru
With optimism,
Dmitry A. Belitsky
|