Welcome! Log In Create A New Profile

Advanced

cgi files in plain text

May 10, 2011 05:59PM
Hi,

I installed nginx and php5-fpm from repositories on ubuntu 10.04.
everything works well. The phpinfo test file works.

I try to access collection (for collectd) pages. When I access the url of the collection3/bin/index.cgi, I can see the file in plain text.

This is the config file used :
server {
listen 80;
server_name toto.com;
access_log /var/log/nginx/localhost.access.log;

## Default location
location / {
root /var/www;
index index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
auth_basic "Restricted";
auth_basic_user_file /var/htpasswd_au1;

}

# Protection
#location = /var/www {
# auth_basic "Restricted";
# auth_basic_user_file /var/htpasswd_au1;
#}

## try_files $uri $uri/ /index.php?q=$uri;
## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
root /var/www;
}



## Parse all .php file in the /var/www directory
location ~ .php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}

## Disable viewing .htaccess & .htpassword
location ~ /\.ht {
deny all;
}
}
upstream backend {
server 127.0.0.1:9000;
}

Thanks
Subject Author Posted

cgi files in plain text

jeanjan May 10, 2011 05:59PM

Re: cgi files in plain text

brianmercer May 10, 2011 07:07PM

Re: cgi files in plain text

jeanjan May 14, 2011 08:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 57
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready