hey Stephan,

yes i have  the proxy_set_header set to Host $http_host.
it's not working with that :(

i'm wondering. i thought the "virtual domain extension" gets the information out of the url ?


the complete nginx config file:

upstream cannesdepetrol {
  server 127.0.0.1:8090;
  server 127.0.0.1:8091;
}

server {
  # port to listen on. Can also be set to an IP:PORT
  listen 80;

  # Set the max size for file uploads to 50Mb
  client_max_body_size 50M;

  # sets the domain[s] that this vhost server requests for.
server_name cannesdepetrol.de www.cannesdepetrol.de de.cannesdepetrol.de en.cannesdepetrol.de;

  # doc root
  root /var/www/apps/cannesdepetrol/public;

  # vhost specific access log
  access_log /var/www/apps/cannesdepetrol/log/nginx.access.log main;

  # this rewrites all the requests to the maintenance.html
  # page if it exists in the doc root. This is for capistrano’s
  # disable web task
  if (-f $document_root/system/maintenance.html) {
    rewrite ^(.*)$ /system/maintenance.html last;
    break;
  }

  location / {
    # Uncomment to allow server side includes so nginx can
    # post-process Rails content

    proxy_set_header Host $http_host;

    # If the file exists as a static file serve it directly without
    # running all the other rewite tests on it
    if (-f $request_filename) {
      break;
    }

    # check for index.html for directory index
    # if its there on the filesystem then rewite
    # the url to add /index.html to the end of it
    # and then break to send it to the next config rules.
    if (-f $request_filename/index.html) {
      rewrite (.*) $1/index.html break;
    }

    # this is the meat of the rails page caching config
    # it adds .html to the end of the url and then checks
    # the filesystem for that file. If it exists, then we
    # rewite the url to have explicit .html on the end
    # and then send it on its way to the next config rule.
    # if there is no file on the fs then it sets all the
    # necessary headers and proxies to our upstream mongrels
    if (-f $request_filename.html) {
      rewrite (.*) $1.html break;
    }

    # You’ll need to change this proxy_pass to match
    # what you specified above. It must be unique to each vhost.

    if (!-f $request_filename) {
      proxy_pass http://cannesdepetrol;
      break;
    }
  }

  error_page 500 502 503 504 /500.html;
  location = /500.html {
    root /var/www/apps/cannesdepetrol/public;
  }
}


Am 12.08.2008 um 13:44 schrieb Stephen Lombardo:

Hi Kalle,
Do you have a proxy_set_header line in your nginx config? If not, try to add
a line like this within the location block?

location / {
 ...
 proxy_set_header Host $http_host;
 ...

 if (!-f $request_filename) {
    proxy_pass http://cannesdepetrol;
    break;
  }}

Cheers,
Stephen

On Tue, Aug 12, 2008 at 7:21 AM, kalle saas <[EMAIL PROTECTED]> wrote:

Hey,

to bad i don't figured it out yet :(.

but maybe someone can help me understand the problem or how it works...

the extension works by analyzing the domain. how can i let me show what
domain the extesnion find ?

in the explanation for "How To Host Multiple Websites by using mod proxy"

<VirtualHost ServerIP:80>
ServerName www.anotherwebsite.com
ProxyPass / http://www.yourradiantinstall.com/radiant
</VirtualHost>

on nginx i have:

upstream cannesdepetrol {
server 127.0.0.1:8090;
server 127.0.0.1:8091;
}

server {
# port to listen on. Can also be set to an IP:PORT
listen 80;
# sets the domain[s] that this vhost server requests for.
server_name cannesdepetrol.de www.cannesdepetrol.de de.cannesdepetrol.de
en.cannesdepetrol.de;
...

location / {
...
  if (!-f $request_filename) {
    proxy_pass http://cannesdepetrol;
    break;
  }
...
}

i tried to split every subdomain and give it its own server, but it doesent
work out.

Would be nice if anyone has an idea or could give me a direction.

regards,
kalle




Am 07.08.2008 um 10:35 schrieb kalle saas:

Hey guys,

maybe somebody can help me with my problem:
i have ha multilanguage radiant site running at:
http://cannesdepetrol.de/

it schould be in german at this domain:
http://de.cannesdepetrol.de/ and in english: http://en.cannesdepetrol.de/

as you can see it doesn't work :( but with the same radiant setup, but
with youst one mongrel running ( script/server -e production ) at:
http://de.feedyourflat.com:3000/  and  http://en.feedyourflat.com:3000/
it works...

i have a mongrel cluster and nginx running with the
http://cannesdepetrol.de/ site.

any suggestions ??

regards,
kalle

the nginx config:
http://pastie.org/249048

mongrel config:
http://pastie.org/249049

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to