proxy dynamic requests to apache

Stefanita rares Dumitrescu lists at ruby-forum.com
Fri Jan 11 17:45:10 MSK 2008


hi guys,
this is my server config, that should pass dynamic requests, eg: php
pages, to apache listening to localhost.

i know i did it good and working in the past, but now i am missing
something and i don't know what i did wrong. php pages are being parsed
by nginx now, and not sent to apache.

can you give me a clue?

thanks.

   server {
        listen       1.1.1.1:80;
        server_name  host1.net;
        #charset koi8-r;
        access_log  logs/m1.e-muzica.net.access.log main;

        location / {
            root   /home/m1emuz/public_html;
            index  index.html index.htm index.php;
        }

        # serve static files directly
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|flv|zip|mp3|txt)$ {
            root              /home/m1emuz/public_html;
            access_log        off;
            expires           30d;
        }

        location / {
            proxy_pass        http://localhost:8000/;
            proxy_redirect    off;
            proxy_set_header  X-Forwarded-For
$proxy_add_x_forwarded_for;
            proxy_set_header  X-Real-IP  $remote_addr;
            proxy_set_header  Host $http_host;

        }

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/local/www/nginx-dist;
        }


   }
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list