Welcome! Log In Create A New Profile

Advanced

help to install PHP

Posted by gordonisnz 
help to install PHP
August 25, 2010 08:28AM
Good day,

I'm trying to install PHP on Nginx / Ubuntu (linux). - using Codeigniter

I have my html files in a directory /home/sites/SITE-NAME/

error message in logs
[quote]
2010/08/26 00:15:49 [error] 4017#0: *1 open() "/usr/local/nginx/html/index.php" failed (2: No such file or directory),
[/quote]

in my /etc/nginx/sites-available/default file - I have

[quote]

server {
listen 80;
server_name mysite.com;
access_log /var/log/nginx/localhost.access.log;

location / {
root /home/sites/site.org;
index index.php index.html index.htm;
}

[/quote]

( the site.org reference is the name of the directory )


in my /etc/hosts file - it is correct (I was viewing my site - plain HTML - before trying to install PHP...



QUESTIONS :-

Has nginx got a "debug" mode ? ie to put errors on-screen, instead of me trying to view the logs directory)..

- Also, more debug info - Ie "trying to install PHP, not found etc" - or "loading PHP - OK "

:- Loading hosts file - html loading from (directory location)


PS - i do restart nginx, & it says it is loaded correctly...
Re: help to install PHP
August 25, 2010 08:43AM
PS..

if I take this script out - - I can view my site (but no PHP)..

in my /etc/nginx/sites-available/default file - I have

[quote]
## Parse all .php file in the /var/www directory
location ~ .php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
## fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/sites/$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;
}

[/quote]


so, something in the above code, forces nginx to ignore my /home/sites/ directory & return to the nginx default..

If I dont have that in my "default" file - The HTML files (if any) get displayed as normal, from the correct /home/sites/ directory


is there a dummies-guide to installing PHP on Ubuntu/Nginx.




I'm off to bed - Will try again tomorow....



Edited 1 time(s). Last edit at 08/25/2010 08:44AM by gordonisnz.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 264
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready