Hi,
I have installed:
Here is my /usr/local/etc/nginx/nginx.conf file:
When I try to access PHP file from the browser
/usr/local/www/nginx/test.php
I get this message:
Could you please help me to resolve my problem?
Thank you!
I have installed:
- FreeBSD Release Name 8.3-RELEASE
- nginx-1.2.7_1,1
- php53-5.3.22
- php53-extensions-1.6
- libtool-2.4.2
Code:
bsd# netstat
Active UNIX domain sockets
Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr
c49576b8 stream 0 0 c4a3ec90 0 0 0 /var/run/php-fpm.sock
Code:
user nobody;
worker_processes 1;
error_log /var/logs/nginx_error.log;
pid /var/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"';
sendfile on;
keepalive_timeout 65;
gzip on;
# We define the virtual host here
server {
listen 80;
server_name localhost;
access_log /var/log/access.log main;
location / {
root /usr/local/www/nginx/;
index index.html index.htm index.php;
}
# Let nginx know how to handle PHP using fastcgi
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
}
/usr/local/www/nginx/test.php
Code:
<?php
phpinfo();
?>
I get this message:
Code:
An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.
Thank you!