View Single Post
  #1  
Old 11th March 2013, 13:20
nightguide nightguide is offline
Junior Member
 
Join Date: Mar 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow Web CGIProxy + Nginx + FastCGI

I'm trying to set up your Cgiproxy, to my server. As a web server, I use nginx version 1.2.7, all starts, but when I try to access any site your proxy gives me This is the result

http://78.46.236.56/proxy.php
http://78.46.236.56/secret/p0/x-proxy/start

404 Not Found

nginx/1.2.7

writes in the log nginx-error.log :


2013/03/11 10:28:29 [error] 9618#0: *2 open() "/var/www/html/secret/p0/x-proxy/start" failed (2: No such file or directory),$


here are my configs

nginx.conf


#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root /var/www/html;
index index.html index.htm;
}

#error_page 404 /404.html;

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

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

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /var/www/html;
fastcgi_pass unix:/tmp/proxy.socket;
fastcgi_index proxy.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/proxy.php;
####proxy.php is your nph-proxy.pl######
include fastcgi_params;
}

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


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443;
# server_name localhost;

# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_timeout 5m;

# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}


conf proxy.php

$PROXY_DIR= '/var/www/html/

$SECRET_PATH= 'secret' ;

$FCGI_SOCKET= '/tmp/proxy.socket' ;



$FCGI_SOCKET= '/tmp/proxy.socket' ;


process is started

....
10205 pts/1 S+ 0:00 perl-fcgi
10206 pts/1 S+ 0:00 perl-fcgi
10207 pts/1 S+ 0:00 perl-fcgi
10208 pts/1 S+ 0:00 perl-fcgi
10209 pts/1 S+ 0:00 perl-fcgi
10210 pts/1 S+ 0:00 perl-fcgi
10211 pts/1 S+ 0:00 perl-fcgi
10212 pts/1 S+ 0:00 perl-fcgi
10213 pts/1 S+ 0:00 perl-fcgi
10214 pts/1 S+ 0:00 perl-fcgi
10215 pts/1 S+ 0:00 perl-fcgi
10216 pts/1 S+ 0:00 perl-fcgi
10217 pts/1 S+ 0:00 perl-fcgi
10218 pts/1 S+ 0:00 perl-fcgi
10219 pts/1 S+ 0:00 perl-fcgi
10220 pts/1 S+ 0:00 perl-fcgi
10221 pts/1 S+ 0:00 perl-fcgi
10222 pts/1 S+ 0:00 perl-fcgi
10223 pts/1 S+ 0:00 perl-fcgi

I am Russian and my English can be very bad ((

Last edited by nightguide; 11th March 2013 at 13:23.
Reply With Quote
Sponsored Links