Error Worker process with substitutions4nginx

Martronic SA martronic at martronic.ch
Thu Sep 2 16:20:28 MSD 2010



Hello!

I need you help...

I'm using nginx for two years without having any problems.

I want to create sub-domains on a website and I have to rewrite the urls with the "substitutions4nginx" module.
Since the installation of this module and it's configuration I'm having problems.

The problem is:

After some time, one or many worker process are at 100% even if there is not more connections on the website as there is usually.
I have to restart nginx to have it working properly.

I think that my configuaration is not correct... In my configuration I would like define that there is no url rewriting when there is a cookie.



NGINX Version:
====================

/usr/sbin/nginx -V
nginx version: nginx/0.7.67
built by gcc 4.3.2 (Debian 4.3.2-1.1)
TLS SNI support enabled
configure arguments: --prefix=/usr --user=www-data --group=www-data
--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error_log
--pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access_log --http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--with-http_dav_module --with-http_realip_module --with-http_ssl_module
--with-http_stub_status_module --with-debug --add-module=/root/substitutions4nginx

error.log
====================

2010/09/02 11:46:35 [debug] 16331#0: *1 event timer del: 14: 1283420858304 2010/09/02 11:46:35
[debug] 16331#0: *1 generic phase: 0
2010/09/02 11:46:35 [debug] 16331#0: *1 add cleanup: 00000000006D4648 2010/09/02 11:46:35
[debug] 16331#0: *1 generic phase: 1
2010/09/02 11:46:35 [debug] 16331#0: *1 http script var
2010/09/02 11:46:35 [debug] 16331#0: *1 http script var: "www.hopla-net.com" 2010/09/02
11:46:35 [debug] 16331#0: *1 http script regex: "^hopla-net\.com$" 2010/09/02 11:46:35
[notice] 16331#0: *1 "^hopla-net\.com$" does not match "www.hopla-net.com", client: 127.0.0.1,
server: www.hopla-net.com, reque$ 2010/09/02 11:46:35 [debug] 16331#0: *1 http script if
2010/09/02 11:46:35 [debug] 16331#0: *1 http script if: false
2010/09/02 11:46:35 [debug] 16331#0: *1 http script regex: "^/bale(.*)" 2010/09/02 11:46:35
[notice] 16331#0: *1 "^/bale(.*)" does not match
"/alsace/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/", client: 127$ 2010/09/02
11:46:35 [debug] 16331#0: *1 http script regex: "^/alsace(.*)" 2010/09/02 11:46:35 [notice]
16331#0: *1 "^/alsace(.*)" matches
"/alsace/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/", client: 127.0.0.$
2010/09/02 11:46:35 [debug] 16331#0: *1 http script copy: "http://alsace.hopla-net.com"
2010/09/02 11:46:35 [debug] 16331#0: *1 http script capture:
"/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/"
2010/09/02 11:46:35 [debug] 16331#0: *1 http script regex end
2010/09/02 11:46:35 [notice] 16331#0: *1 rewritten redirect:
"http://alsace.hopla-net.com/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/",$
2010/09/02 11:46:35 [debug] 16331#0: *1 http finalize request: 302,
"/alsace/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/?" 1 2010/09/02 11:46:35
[debug] 16331#0: *1 http special response: 302,
"/alsace/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/?" 2010/09/02 11:46:35 [debug]
16331#0: *1 http set discard body
2010/09/02 11:46:35 [debug] 16331#0: *1 HTTP/1.1 302 Moved Temporarily Server: nginx/0.7.67
Date: Thu, 02 Sep 2010 09:46:35 GMT
Content-Type: text/html
Content-Length: 161
Connection: close
Location: http://alsace.hopla-net.com/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/
2010/09/02 11:46:35 [debug] 16331#0: *1 event timer del: 14: 1283420858304 2010/09/02 11:46:35
[debug] 16331#0: *1 generic phase: 0
2010/09/02 11:46:35 [debug] 16331#0: *1 add cleanup: 00000000006D4648 2010/09/02 11:46:35
[debug] 16331#0: *1 generic phase: 1
2010/09/02 11:46:35 [debug] 16331#0: *1 http script var
2010/09/02 11:46:35 [debug] 16331#0: *1 http script var: "www.hopla-net.com" 2010/09/02
11:46:35 [debug] 16331#0: *1 http script regex: "^hopla-net\.com$" 2010/09/02 11:46:35
[notice] 16331#0: *1 "^hopla-net\.com$" does not match "www.hopla-net.com", client: 127.0.0.1,
server: www.hopla-net.com, reque$ 2010/09/02 11:46:35 [debug] 16331#0: *1 http script if
2010/09/02 11:46:35 [debug] 16331#0: *1 http script if: false
2010/09/02 11:46:35 [debug] 16331#0: *1 http script regex: "^/bale(.*)" 2010/09/02 11:46:35
[notice] 16331#0: *1 "^/bale(.*)" does not match
"/alsace/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/", client: 127$ 2010/09/02
11:46:35 [debug] 16331#0: *1 http script regex: "^/alsace(.*)" 2010/09/02 11:46:35 [notice]
16331#0: *1 "^/alsace(.*)" matches
"/alsace/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/", client: 127.0.0.$
2010/09/02 11:46:35 [debug] 16331#0: *1 http script copy: "http://alsace.hopla-net.com"
2010/09/02 11:46:35 [debug] 16331#0: *1 http script capture:
"/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/"
2010/09/02 11:46:35 [debug] 16331#0: *1 http script regex end
2010/09/02 11:46:35 [notice] 16331#0: *1 rewritten redirect:
"http://alsace.hopla-net.com/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/",$
2010/09/02 11:46:35 [debug] 16331#0: *1 http finalize request: 302,
"/alsace/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/?" 1 2010/09/02 11:46:35
[debug] 16331#0: *1 http special response: 302,
"/alsace/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/?" 2010/09/02 11:46:35 [debug]
16331#0: *1 http set discard body
2010/09/02 11:46:35 [debug] 16331#0: *1 HTTP/1.1 302 Moved Temporarily Server: nginx/0.7.67
Date: Thu, 02 Sep 2010 09:46:35 GMT
Content-Type: text/html
Content-Length: 161
Connection: close
Location: http://alsace.hopla-net.com/artistes/peintres/lucienne-aman-aquarelle-ou-acrylique/


graph nginx
info-nginx


First configuration I had (no problems):
============================================================

   upstream hoplanet {
     ip_hash;
     server 127.0.0.1:8194 max_fails=3 fail_timeout=30s;
     server 127.0.0.1:8193 max_fails=3 fail_timeout=30s;
     server 127.0.0.1:8192 max_fails=3 fail_timeout=30s;
     server 127.0.0.1:8191 max_fails=3 fail_timeout=30s;
   }

   server {
     listen 8201;
     server_name hopla-net.com www.hopla-net.com;
     access_log /home/awstats/hoplanet/access.log varnish;

     if ($host ~* ^hopla-net\.com$) {
        rewrite ^(.*) http://www.hopla-net.com$1 permanent;
        break;
     }

     rewrite ^/(.*) /VirtualHostBase/http/www.hopla-net.com:80/hoplanet/VirtualHostRoot/$1
last;

     location / {
       proxy_pass http://hoplanet;
     }

   }

New configuration that has the problem:
=========================================

   upstream hoplanet {
     ip_hash;
     server 127.0.0.1:9190 max_fails=6 fail_timeout=60s;
     server 127.0.0.1:9191 max_fails=6 fail_timeout=60s;
     server 127.0.0.1:9192 max_fails=6 fail_timeout=60s;
     server 127.0.0.1:9193 max_fails=6 fail_timeout=60s;
   }

   server {
     listen 8201;
     server_name www.hopla-net.com hopla-net.com;
     error_log  /home/awstats/nginx/error.log debug;
     access_log /home/awstats/hoplanet/access.log varnish;

     if ($host ~* ^hopla-net\.com$) {
        rewrite ^(.*) http://www.hopla-net.com$1 permanent;
        break;
     }

        rewrite ^/bale(.*) http://bale.hopla-net.com$1;
        rewrite ^/alsace(.*) http://alsace.hopla-net.com$1;
        rewrite ^/bade-sud(.*) http://bade-sud.hopla-net.com$1;
        rewrite ^/jura(.*) http://jura.hopla-net.com$1;
        rewrite ^/bons-plans(.*) http://bons-plans.hopla-net.com$1; subs_filter_types text/html
text/xml;
        subs_filter 'http://www.hopla-net.com/alsace' 'http://alsace.hopla-net.com';
subs_filter 'http://www.hopla-net.com/bade-sud' 'http://bade-sud.hopla-net.com';
subs_filter 'http://www.hopla-net.com/bale' 'http://bale.hopla-net.com'; subs_filter
'http://www.hopla-net.com/jura' 'http://jura.hopla-net.com'; subs_filter
'http://www.hopla-net.com/bons-plans' 'http://bons-plans.hopla-net.com';

     rewrite ^/(.*) /VirtualHostBase/http/www.hopla-net.com:80/hopla-net/VirtualHostRoot/$1
last;

     location / {
       proxy_pass http://hoplanet;
     }
   }

   server {
     listen 8201;
     server_name bale.hopla-net.com;
     access_log /home/awstats/hoplanet/access.log varnish;

     if ($host ~* ^hopla-net\.com$) {
        rewrite ^(.*) http://www.hopla-net.com$1 permanent;
        break;
     }

        rewrite ^/accueil(.*) http://www.hopla-net.com$1;
        rewrite ^/bale(.*) http://bale.hopla-net.com$1;
        rewrite ^/alsace(.*) http://alsace.hopla-net.com$1;
        rewrite ^/bade-sud(.*) http://bade-sud.hopla-net.com$1;
        rewrite ^/jura(.*) http://jura.hopla-net.com$1;
        rewrite ^/bons-plans(.*) http://bons-plans.hopla-net.com$1;

        subs_filter_types text/html text/xml;
        subs_filter 'id="portal-logo" href="http://bale.hopla-net.com"' 'id="portal-logo"
href="http://www.hopla-net.com"';
        subs_filter 'class="home" href="http://bale.hopla-net.com"' 'class="home"
href="http://www.hopla-net.com"';
        subs_filter 'http://bale.hopla-net.com/accueil' 'http://www.hopla-net.com/accueil';
subs_filter 'http://bale.hopla-net.com/alsace' 'http://alsace.hopla-net.com';
subs_filter 'http://bale.hopla-net.com/bade-sud' 'http://bade-sud.hopla-net.com';
subs_filter 'http://bale.hopla-net.com/bale' 'http://bale.hopla-net.com'; subs_filter
'http://bale.hopla-net.com/jura' 'http://jura.hopla-net.com'; subs_filter
'http://bale.hopla-net.com/bons-plans' 'http://bons-plans.hopla-net.com';

     rewrite ^/(.*)
/VirtualHostBase/http/bale.hopla-net.com:80/hopla-net/bale/VirtualHostRoot/$1 last;

     location / {
       proxy_pass http://hoplanet;
     }
   }

   server {
     listen 8201;
     server_name alsace.hopla-net.com;
     access_log /home/awstats/hoplanet/access.log varnish;

     if ($host ~* ^hopla-net\.com$) {
        rewrite ^(.*) http://www.hopla-net.com$1 permanent;
        break;
     }

     rewrite ^/accueil(.*) http://www.hopla-net.com$1;
     rewrite ^/bale(.*) http://bale.hopla-net.com$1;
     rewrite ^/alsace(.*) http://alsace.hopla-net.com$1;
     rewrite ^/bade-sud(.*) http://bade-sud.hopla-net.com$1;
     rewrite ^/jura(.*) http://jura.hopla-net.com$1;
     rewrite ^/bons-plans(.*) http://bons-plans.hopla-net.com$1;

        subs_filter_types text/html text/xml;
        subs_filter 'id="portal-logo" href="http://alsace.hopla-net.com"' 'id="portal-logo"
href="http://www.hopla-net.com"';
        subs_filter 'class="home" href="http://alsace.hopla-net.com"' 'class="home"
href="http://www.hopla-net.com"';
        subs_filter 'http://alsace.hopla-net.com/accueil' 'http://www.hopla-net.com/accueil';
subs_filter 'http://alsace.hopla-net.com/alsace' 'http://alsace.hopla-net.com';
subs_filter 'http://alsace.hopla-net.com/bade-sud' 'http://bade-sud.hopla-net.com';
subs_filter 'http://alsace.hopla-net.com/bale' 'http://bale.hopla-net.com'; subs_filter
'http://alsace.hopla-net.com/jura' 'http://jura.hopla-net.com'; subs_filter
'http://alsace.hopla-net.com/bons-plans' 'http://bons-plans.hopla-net.com';

     rewrite ^/(.*)
/VirtualHostBase/http/alsace.hopla-net.com:80/hopla-net/alsace/VirtualHostRoot/$1 last;

     location / {
       proxy_pass http://hoplanet;
     }
   }

   server {
     listen 8201;
     server_name bade-sud.hopla-net.com;
     access_log /home/awstats/hoplanet/access.log varnish;

     if ($host ~* ^hopla-net\.com$) {
        rewrite ^(.*) http://www.hopla-net.com$1 permanent;
        break;
     }

     rewrite ^/accueil(.*) http://www.hopla-net.com$1;
     rewrite ^/bale(.*) http://bale.hopla-net.com$1;
     rewrite ^/alsace(.*) http://alsace.hopla-net.com$1;
     rewrite ^/bade-sud(.*) http://bade-sud.hopla-net.com$1;
     rewrite ^/jura(.*) http://jura.hopla-net.com$1;
     rewrite ^/bons-plans(.*) http://bons-plans.hopla-net.com$1;

        subs_filter_types text/html text/xml;
        subs_filter 'id="portal-logo" href="http://bade-sud.hopla-net.com"' 'id="portal-logo"
href="http://www.hopla-net.com"';
        subs_filter 'class="home" href="http://bade-sud.hopla-net.com"' 'class="home"
href="http://www.hopla-net.com"';
        subs_filter 'http://bade-sud.hopla-net.com/accueil' 'http://www.hopla-net.com/accueil';
subs_filter 'http://bade-sud.hopla-net.com/alsace' 'http://alsace.hopla-net.com';
subs_filter 'http://bade-sud.hopla-net.com/bade-sud' 'http://bade-sud.hopla-net.com';
subs_filter 'http://bade-sud.hopla-net.com/bale' 'http://bale.hopla-net.com';
subs_filter 'http://bade-sud.hopla-net.com/jura' 'http://jura.hopla-net.com';
subs_filter 'http://bade-sud.hopla-net.com/bons-plans'
'http://bons-plans.hopla-net.com';

     rewrite ^/(.*)
/VirtualHostBase/http/bade-sud.hopla-net.com:80/hopla-net/bade-sud/VirtualHostRoot/$1 last;

     location / {
       proxy_pass http://hoplanet;
     }
   }


   server {
     listen 8201;
     server_name jura.hopla-net.com;
     access_log /home/awstats/hoplanet/access.log varnish;

     if ($host ~* ^hopla-net\.com$) {
        rewrite ^(.*) http://www.hopla-net.com$1 permanent;
        break;
     }

     rewrite ^/accueil(.*) http://www.hopla-net.com$1;
     rewrite ^/bale(.*) http://bale.hopla-net.com$1;
     rewrite ^/alsace(.*) http://alsace.hopla-net.com$1;
     rewrite ^/bade-sud(.*) http://bade-sud.hopla-net.com$1;
     rewrite ^/jura(.*) http://jura.hopla-net.com$1;
     rewrite ^/bons-plans(.*) http://bons-plans.hopla-net.com$1;

        subs_filter_types text/html text/xml;
        subs_filter 'id="portal-logo" href="http://jura.hopla-net.com"' 'id="portal-logo"
href="http://www.hopla-net.com"';
        subs_filter 'class="home" href="http://jura.hopla-net.com"' 'class="home"
href="http://www.hopla-net.com"';
        subs_filter 'http://jura.hopla-net.com/accueil' 'http://www.hopla-net.com/accueil';
subs_filter 'http://jura.hopla-net.com/alsace' 'http://alsace.hopla-net.com';
subs_filter 'http://jura.hopla-net.com/bade-sud' 'http://bade-sud.hopla-net.com';
subs_filter 'http://jura.hopla-net.com/bale' 'http://bale.hopla-net.com'; subs_filter
'http://jura.hopla-net.com/jura' 'http://jura.hopla-net.com'; subs_filter
'http://jura.hopla-net.com/bons-plans' 'http://bons-plans.hopla-net.com';

     rewrite ^/(.*)
/VirtualHostBase/http/jura.hopla-net.com:80/hopla-net/jura/VirtualHostRoot/$1 last;

     location / {
       proxy_pass http://hoplanet;
     }
   }

   server {
     listen 8201;
     server_name bons-plans.hopla-net.com;
     access_log /home/awstats/hoplanet/access.log varnish;

     if ($host ~* ^hopla-net\.com$) {
        rewrite ^(.*) http://www.hopla-net.com$1 permanent;
        break;
     }

     rewrite ^/accueil(.*) http://www.hopla-net.com$1;
     rewrite ^/bale(.*) http://bale.hopla-net.com$1;
     rewrite ^/alsace(.*) http://alsace.hopla-net.com$1;
     rewrite ^/bade-sud(.*) http://bade-sud.hopla-net.com$1;
     rewrite ^/jura(.*) http://jura.hopla-net.com$1;
     rewrite ^/bons-plans(.*) http://bons-plans.hopla-net.com$1;

        subs_filter_types text/html text/xml;
        subs_filter 'id="portal-logo" href="http://bons-plans.hopla-net.com"' 'id="portal-logo"
href="http://www.hopla-net.com"';
        subs_filter 'class="home" href="http://bons-plans.hopla-net.com"' 'class="home"
href="http://www.hopla-net.com"';
        subs_filter 'http://bons-plans.hopla-net.com/accueil'
'http://www.hopla-net.com/accueil';
        subs_filter 'http://bons-plans.hopla-net.com/alsace' 'http://alsace.hopla-net.com';
subs_filter 'http://bons-plans.hopla-net.com/bade-sud' 'http://bade-sud.hopla-net.com';
subs_filter 'http://bons-plans.hopla-net.com/bale' 'http://bale.hopla-net.com';
subs_filter 'http://bons-plans.hopla-net.com/jura' 'http://jura.hopla-net.com';
subs_filter 'http://bons-plans.hopla-net.com/bons-plans'
'http://bons-plans.hopla-net.com';

     rewrite ^/(.*)
/VirtualHostBase/http/bons-plans.hopla-net.com:80/hopla-net/bons-plans/VirtualHostRoot/$1 last;

     location / {
       proxy_pass http://hoplanet;
     }
   }



This is a trial configuration so that urls are not rewritten when there is a cookie.
This configuration is not working....:
===============================================================

upstream hoplanet {
ip_hash;
server 94.23.227.152:9190 max_fails=6 fail_timeout=60s;
server 94.23.227.152:9191 max_fails=6 fail_timeout=60s;
server 94.23.227.152:9192 max_fails=6 fail_timeout=60s;
server 94.23.227.152:9193 max_fails=6 fail_timeout=60s;
}

server {
listen 8201;
server_namewww.hopla-net.com hopla-net.com;
access_log /home/awstats/hoplanet/access.log varnish;


if ($host ~* ^hopla-net\.com$) {
rewrite ^(.*)http://www.hopla-net.com$1 permanent;
break;
}


if ($http_kookie !~* "__ac") {
rewrite ^/bale(.*)http://bale.hopla-net.com$1;
rewrite ^/alsace(.*)http://alsace.hopla-net.com$1;
rewrite ^/bade-sud(.*)http://bade-sud.hopla-net.com$1;
rewrite ^/jura(.*)http://jura.hopla-net.com$1;
rewrite ^/bons-plans(.*)http://bons-plans.hopla-net.com$1;
rewrite ^(.*) $1/filter/;
}


location ~* ^(.*)/filter/$ {
set $true_uri $1;
subs_filter_types text/html text/xml;
subs_filter 'http://www.hopla-net.com/alsace''http://alsace.hopla-net.com';
subs_filter 'http://www.hopla-net.com/bade-sud''http://bade-sud.hopla-net.com';
subs_filter 'http://www.hopla-net.com/bale''http://bale.hopla-net.com';
subs_filter 'http://www.hopla-net.com/jura''http://jura.hopla-net.com';
subs_filter 'http://www.hopla-net.com/bons-plans''http://bons-plans.hopla-net.com';
proxy_pass
http://hoplanet/VirtualHostBase/http/www.hopla-net.com:80/hopla-net/VirtualHostRoot/$true_uri;
break;
}

rewrite ^/(.*)/VirtualHostBase/http/www.hopla-net.com:80/hopla-net/VirtualHostRoot/$1 last;

location / {
proxy_passhttp://hoplanet;
}

}

server {
listen 8201;
server_name bale.hopla-net.com;
access_log /home/awstats/hoplanet/access.log varnish;

if ($http_kookie !~* "__ac") {
rewrite ^/accueil(.*)http://www.hopla-net.com$1;
rewrite ^/alsace(.*)http://alsace.hopla-net.com$1;
rewrite ^/bade-sud(.*)http://bade-sud.hopla-net.com$1;
rewrite ^/jura(.*)http://jura.hopla-net.com$1;
rewrite ^/bons-plans(.*)http://bons-plans.hopla-net.com$1;
rewrite ^(.*) $1/filter/;
}


location ~* ^(.*)/filter/$ {
set $true_uri $1;
subs_filter_types text/html text/xml;
subs_filter 'id="portal-logo" href="http://bale.hopla-net.com"  <http://bale.hopla-net.com%22>;' 'id="portal-logo"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'class="home" href="http://bale.hopla-net.com"  <http://bale.hopla-net.com%22>;' 'class="home"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'http://bale.hopla-net.com/accueil''http://www.hopla-net.com/accueil';
subs_filter 'http://bale.hopla-net.com/alsace''http://alsace.hopla-net.com';
subs_filter 'http://bale.hopla-net.com/bade-sud''http://bade-sud.hopla-net.com';
subs_filter 'http://bale.hopla-net.com/jura''http://jura.hopla-net.com';
subs_filter 'http://bale.hopla-net.com/bons-plans''http://bons-plans.hopla-net.com';
proxy_pass
http://hoplanet/VirtualHostBase/http/bale.hopla-net.com:80/hopla-net/bale/VirtualHostRoot/$true_uri;
break;
}

rewrite ^/(.*)
/VirtualHostBase/http/bale.hopla-net.com:80/hopla-net/bale/VirtualHostRoot/$1 last;

location / {
proxy_passhttp://hoplanet;
}

}

server {
listen 8201;
server_name alsace.hopla-net.com;
access_log /home/awstats/hoplanet/access.log varnish;

if ($http_kookie !~* "__ac") {
rewrite ^/accueil(.*)http://www.hopla-net.com$1;
rewrite ^/bale(.*)http://bale.hopla-net.com$1;
rewrite ^/bade-sud(.*)http://bade-sud.hopla-net.com$1;
rewrite ^/jura(.*)http://jura.hopla-net.com$1;
rewrite ^/bons-plans(.*)http://bons-plans.hopla-net.com$1;
rewrite ^(.*) $1/filter/;
}

location ~* ^(.*)/filter/$ {
set $true_uri $1;
subs_filter_types text/html text/xml;
subs_filter 'id="portal-logo" href="http://alsace.hopla-net.com"  <http://alsace.hopla-net.com%22>;' 'id="portal-logo"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'class="home" href="http://alsace.hopla-net.com"  <http://alsace.hopla-net.com%22>;' 'class="home"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'http://alsace.hopla-net.com/accueil''http://www.hopla-net.com/accueil';
subs_filter 'http://alsace.hopla-net.com/bade-sud''http://bade-sud.hopla-net.com';
subs_filter 'http://alsace.hopla-net.com/bale''http://bale.hopla-net.com';
subs_filter 'http://alsace.hopla-net.com/jura''http://jura.hopla-net.com';
subs_filter 'http://alsace.hopla-net.com/bons-plans''http://bons-plans.hopla-net.com';
proxy_pass
http://hoplanet/VirtualHostBase/http/alsace.hopla-net.com:80/hopla-net/alsace/VirtualHostRoot/$true_uri;
break;
}

rewrite ^/(.*)
/VirtualHostBase/http/alsace.hopla-net.com:80/hopla-net/alsace/VirtualHostRoot/$1 last;

location / {
proxy_passhttp://hoplanet;
}

}

server {
listen 8201;
server_name bade-sud.hopla-net.com;
access_log /home/awstats/hoplanet/access.log varnish;


if ($http_kookie !~* "__ac") {
rewrite ^/accueil(.*)http://www.hopla-net.com$1;
rewrite ^/bale(.*)http://bale.hopla-net.com$1;
rewrite ^/bade-sud(.*)http://bade-sud.hopla-net.com$1;
rewrite ^/jura(.*)http://jura.hopla-net.com$1;
rewrite ^/bons-plans(.*)http://bons-plans.hopla-net.com$1;
rewrite ^(.*) $1/filter/;
}

location ~* ^(.*)/filter/$ {
set $true_uri $1;
subs_filter_types text/html text/xml;
subs_filter 'id="portal-logo" href="http://bade-sud.hopla-net.com"  <http://bade-sud.hopla-net.com%22>;' 'id="portal-logo"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'class="home" href="http://bade-sud.hopla-net.com"  <http://bade-sud.hopla-net.com%22>;' 'class="home"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'http://bade-sud.hopla-net.com/accueil''http://www.hopla-net.com/accueil';
subs_filter 'http://bade-sud.hopla-net.com/alsace''http://alsace.hopla-net.com';
subs_filter 'http://bade-sud.hopla-net.com/bale''http://bale.hopla-net.com';
subs_filter 'http://bade-sud.hopla-net.com/jura''http://jura.hopla-net.com';
subs_filter 'http://bade-sud.hopla-net.com/bons-plans''http://bons-plans.hopla-net.com';
proxy_pass
http://hoplanet/VirtualHostBase/http/bade-sud.hopla-net.com:80/hopla-net/bade-sud/VirtualHostRoot/$true_uri;
break;
}

rewrite ^/(.*)
/VirtualHostBase/http/bade-sud.hopla-net.com:80/hopla-net/bade-sud/VirtualHostRoot/$1
last;

location / {
proxy_passhttp://hoplanet;
}

}


server {
listen 8201;
server_name jura.hopla-net.com;
access_log /home/awstats/hoplanet/access.log varnish;

if ($http_kookie !~* "__ac") {
rewrite ^/accueil(.*)http://www.hopla-net.com$1;
rewrite ^/bale(.*)http://bale.hopla-net.com$1;
rewrite ^/bade-sud(.*)http://bade-sud.hopla-net.com$1;
rewrite ^/bons-plans(.*)http://bons-plans.hopla-net.com$1;
rewrite ^(.*) $1/filter/;
}

location ~* ^(.*)/filter/$ {
set $true_uri $1;
subs_filter_types text/html text/xml;
subs_filter 'id="portal-logo" href="http://jura.hopla-net.com"  <http://jura.hopla-net.com%22>;' 'id="portal-logo"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'class="home" href="http://jura.hopla-net.com"  <http://jura.hopla-net.com%22>;' 'class="home"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'http://jura.hopla-net.com/accueil''http://www.hopla-net.com/accueil';
subs_filter 'http://jura.hopla-net.com/alsace''http://alsace.hopla-net.com';
subs_filter 'http://jura.hopla-net.com/bade-sud''http://bade-sud.hopla-net.com';
subs_filter 'http://jura.hopla-net.com/bale''http://bale.hopla-net.com';
subs_filter 'http://jura.hopla-net.com/bons-plans''http://bons-plans.hopla-net.com';
proxy_pass
http://hoplanet/VirtualHostBase/http/jura.hopla-net.com:80/hopla-net/jura/VirtualHostRoot/$true_uri;
break;
}

rewrite ^/(.*)
/VirtualHostBase/http/jura.hopla-net.com:80/hopla-net/jura/VirtualHostRoot/$1 last;

location / {
proxy_passhttp://hoplanet;
}

}

server {
listen 8201;
server_name bons-plans.hopla-net.com;
access_log /home/awstats/hoplanet/access.log varnish;

if ($http_kookie !~* "__ac") {
rewrite ^/accueil(.*)http://www.hopla-net.com$1;
rewrite ^/bale(.*)http://bale.hopla-net.com$1;
rewrite ^/bade-sud(.*)http://bade-sud.hopla-net.com$1;
rewrite ^/jura(.*)http://jura.hopla-net.com$1;
rewrite ^(.*) $1/filter/;
}

location ~* ^(.*)/filter/$ {
set $true_uri $1;
subs_filter_types text/html text/xml;
subs_filter 'id="portal-logo" href="http://bons-plans.hopla-net.com"  <http://bons-plans.hopla-net.com%22>;'
'id="portal-logo" href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'class="home" href="http://bons-plans.hopla-net.com"  <http://bons-plans.hopla-net.com%22>;' 'class="home"
href="http://www.hopla-net.com"  <http://www.hopla-net.com%22>;';
subs_filter 'http://bons-plans.hopla-net.com/accueil''http://www.hopla-net.com/accueil';
subs_filter 'http://bons-plans.hopla-net.com/alsace''http://alsace.hopla-net.com';
subs_filter 'http://bons-plans.hopla-net.com/bade-sud''http://bade-sud.hopla-net.com';
subs_filter 'http://bons-plans.hopla-net.com/bale''http://bale.hopla-net.com';
subs_filter 'http://bons-plans.hopla-net.com/jura''http://jura.hopla-net.com';
proxy_pass
http://hoplanet/VirtualHostBase/http/bons-plans.hopla-net.com:80/hopla-net/bons-plans/VirtualHostRoot/$true_uri;
break;
}

rewrite ^/(.*)
/VirtualHostBase/http/bons-plans.hopla-net.com:80/hopla-net/bons-plans/VirtualHostRoot/$1
last;

location / {
proxy_passhttp://hoplanet;
}

}

***********************************************************

Could you help me with that, please?

Thank you!

Martronic SA
Martial Moret







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100902/1b4f7e0d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: groph-nginx.jpg
Type: image/jpeg
Size: 59334 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20100902/1b4f7e0d/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: info-nginx.jpg
Type: image/jpeg
Size: 18475 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20100902/1b4f7e0d/attachment-0003.jpg>


More information about the nginx mailing list