nginx debian 6 64bits

dumorim nginx-forum at nginx.us
Thu Jul 11 19:02:20 UTC 2013


default.conf

server {


      if ($host !~* ^www\.) {
            rewrite ^(.*)$ http://www.$host$1 permanent;
        }

	listen       80;
		server_name exemple.org;
		index index.html index.htm index.php;
		root  /home/home;

    location / {
        root   /home/malucos;
        index  index.html index.htm index.php;

    } 
		location /status {
			stub_status on;
			access_log   off;
		}
location /home/min {
  rewrite ^/(.*\.(css|js))$ /home/min/index.php?f=$1&debug=0 break;
}


client_max_body_size 120M;
    error_page  404              /404.html;

	#location /doc/ {
		#alias /usr/share/doc/;
		#autoindex on;
		#allow 127.0.0.1;
		#allow ::1;
		#deny all;
	#}
location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                    		fastcgi_pass 127.0.0.1:9999;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
                       include /etc/nginx/fastcgi_params;

               }
 
               location ~*
^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
 
        }
 
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }
    # redirect server error pages to the static page /50x.html
    #
    #error_page   500 502 503 504  /50x.html;
    location = /404.html {
        root   /home/malucos;
    }


    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
     #   proxy_pass   http://www.malucos-share.org;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
	location ~ \.php$ {

		fastcgi_pass 127.0.0.1:9999;

		fastcgi_index  index.php;
		  include /etc/nginx/fastcgi_params;

        	fastcgi_param SCRIPT_FILENAME /home/malucos$fastcgi_script_name;

        	fastcgi_param SERVER_NAME $http_host;



    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}

}

erro
502 bad gateway

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,240765,240765#msg-240765



More information about the nginx mailing list