Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rewrite rule
- To: nginx-ru-announce@xxxxxxxxx
- Subject: rewrite rule
- From: Stepanov Dmitriy <dmitriy.st1964@xxxxxxxxx>
- Date: Fri, 30 Mar 2012 15:08:23 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1333109304; bh=KAczhVq7wVJfhmfmXrUNSNFTEgoTFE8xn72/Ym2l4Js=; h=From:To:Subject:MIME-Version:Message-Id:Date: Content-Transfer-Encoding:Content-Type; b=EowjgmN6J4X4oCzBF9dzjHRUX0AZ4+5KRZEs5NqDRx988usN0MQq55RbHn9MA3+Wd p3Ad1mFXGcNIRuCgHCRtbOtZipe4vlKksgKUOEj+fdAYtD5z6ydHpspmJi58mK6ReK 250MGNDZXP17LB+1pWxDOWRHUwjd7bF1CJSu85qg=
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1333109304; bh=KAczhVq7wVJfhmfmXrUNSNFTEgoTFE8xn72/Ym2l4Js=; h=From:To:Subject:MIME-Version:Message-Id:Date: Content-Transfer-Encoding:Content-Type; b=EowjgmN6J4X4oCzBF9dzjHRUX0AZ4+5KRZEs5NqDRx988usN0MQq55RbHn9MA3+Wd p3Ad1mFXGcNIRuCgHCRtbOtZipe4vlKksgKUOEj+fdAYtD5z6ydHpspmJi58mK6ReK 250MGNDZXP17LB+1pWxDOWRHUwjd7bF1CJSu85qg=
- Resent-date: Fri, 30 Mar 2012 16:11:40 +0400
- Resent-from: Igor Sysoev <igor@xxxxxxxxx>
- Resent-message-id: <20120330121140.GA49667@xxxxxxxxx>
- Resent-to: nginx-ru@xxxxxxxxx
Есть работающая конструкция, понадобидось ввести проксирование
location /stuff / {
proxy_pass http://12.34.56.78:1088;
}
Но данное проксирование не работает из-за if конструкции. Есть ли способ,
заметить if на location, что бы выполнялось правило: всё, кроме определённых
форматов перенаправлялось на index.php?
server {
listen 80;
server_name www.example.ru;
?
root /var/www/site;
index index.php;
if ($request_filename !~*
\.(js|txt|gif|jpg|jpeg|png|css|swf|html|xml|xls|php|)$) {
rewrite ^(.*)$ /index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/site$fastcgi_script_name;
include fastcgi_params;
}
location /stuff / {
proxy_pass http://12.34.56.78:1088;
}
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|