PHP Not Working

I am aware I am posting this again but a boy told me to change the port,
which I have however it only made loading the php page take longer, but
it still ends in a resulted broken page.

Here is my default.conf file, if anybody can fix it up so I can get my
site working.

[code]# You may add here your

server {

}

statements for each of your virtual hosts

server {
listen 80;
server_name thefoool.co.uk;

access_log /media/disk/localhost.access.log;

location / {
root /media/disk/web_server;
index index.html index.htm index.php;
}

    root /media/disk/web_server;

location /doc {
autoindex on;
allow 127.0.0.1;
deny all;
}

location /games {
allow all;
autoindex on;
}

    location /music {
            allow all;
            autoindex on;
    }

    location /layla {
            allow all;
            autoindex on;
    }

#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 /media/disk/web_server;
}

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$ {
fastcgi_pass thefoool.co.uk:81;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/media/disk/web_server/$fastcgi_script_name;
fastcgi_param SCRIPT_NAME
/media/disk/web_server/$fastcgi_script_name;
include /etc/nginx/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
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers on;

#location / {
#root html;
#index index.html index.htm;
#}
#}[/code]

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

Your error is not in your Nginx configuration. Are you sure your have
configured PHP to listen on port 81, though? This seems like an odd port
to start PHP on. Can you paste your php-fpm configuration?

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

Hi Cain,

On 17/04/2011 20:46, Cain wrote:

I am aware I am posting this again but a boy told me to change the port,
I haven’t been called a boy these last 50 years! :slight_smile:
which I have however it only made loading the php page take longer, but
it still ends in a resulted broken page.

snip

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$ {
fastcgi_pass thefoool.co.uk:81;
That is not port 9000 that is 81. Which are you using?
fastcgi_index index.php;
I suspect the key parts you need are:

  index index.php;
  location ~ \.php {
        fastcgi-pass 127.0.01:9000;
        fastcgi-param  SCRIPT_FILENAME

$document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

But you must match the port (the 9000) with the port you have started
php-fastcgi on.

Regards

Ian

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs