Error install nginx version 1.6.2 in Ubuntu 14.04
5,037
Solucionado!!
add code linea
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
example:
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
Related videos on Youtube
Comments
-
Kedinn Turpo over 1 year
My server is Ubuntu 14.04 the info.php is blank :( I do not really know what's happening I want to install the latest version of nginx
I followed these steps:
install nginx
apt-get install python-software-properties' add-apt-repository ppa:nginx/stable apt-get update apt-get install nginx
install php
sudo apt-get install php5-fpm php5-mysql sudo nano /etc/php5/fpm/php.ini
uncommenting line
cgi.fix_pathinfo=0
sudo service php5-fpm restart sudo nano /etc/nginx/sites-available/default
edit file
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.php index.html index.htm; server_name localhost; location / { try_files $uri $uri/ =404; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } sudo service nginx restart
create file and save
sudo nano /usr/share/nginx/html/info.php <?php phpinfo(); ?>
Please help install the latest version of nginx.
-
Admin over 9 yearsI dont see any problem there, you install NGINX and nginx is working, but you install PHP ? so.. apt-get php5-fpm php5-cgi and what is the error ? you say in title error on nginx, but your problem is phinfo()... ( is phpinfo function enable on php.ini ? ), and check nginx error_log :)
-
Kedinn Turpo over 9 yearsMy error log - - [21/Sep/2014:17:14:16 -0400] "GET /inhfo.php HTTP/1.1" 404 200 "- " "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Ch rome/37.0.2062.120 Safari/537.36"
-
Kedinn Turpo over 9 yearsSince this is our first time using apt For This session, we start off by updating Should our Local package index. We can then install the server: nginx 1.4 works normally
-
Admin over 9 yearsThat's your access log and you made a typo in your browser:
inhfo.php
is notinfo.php
.
-
-
baldrs over 9 yearsAny explanation why it is changed? I was using absolute path basing on $host and hosts folder before nginx 1.6 pulled in