i've decided to give nginx a whirl instead of apache...but im having a few problems running php on it.
here is my config file
-----------------------------------------------------
server {
listen 80;
server_name development;
#charset koi8-r;
access_log logs/error.log main;
location / {
root C:\Users\Ricky\Desktop\www;
index index.php;
}
#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 C:\Users\Ricky\Desktop\www;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php(/.*)?$ {
root C:\Users\Ricky\Desktop\www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME C:\Users\Ricky\Desktop\www$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
-----------------------------------------
then i used
---------------------------------------
@ECHO OFF
start c:\nginx\nginx.exe
start c:\php\5.6.11\php-cgi.exe -b 127.0.0.1:9000 -c c:\php\5.6.11\php.ini
ping 127.0.0.1 -n 1>NUL
echo starting nginx
echo .
echo ..
echo ...
ping 127.0.0.1 >NUL
EXIT
-----------------------------------------
to start nginx and php but when accessing http://localhost nothing is displayed.
where am i going wrong please guys?
thank you
here is my config file
-----------------------------------------------------
server {
listen 80;
server_name development;
#charset koi8-r;
access_log logs/error.log main;
location / {
root C:\Users\Ricky\Desktop\www;
index index.php;
}
#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 C:\Users\Ricky\Desktop\www;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php(/.*)?$ {
root C:\Users\Ricky\Desktop\www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME C:\Users\Ricky\Desktop\www$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
-----------------------------------------
then i used
---------------------------------------
@ECHO OFF
start c:\nginx\nginx.exe
start c:\php\5.6.11\php-cgi.exe -b 127.0.0.1:9000 -c c:\php\5.6.11\php.ini
ping 127.0.0.1 -n 1>NUL
echo starting nginx
echo .
echo ..
echo ...
ping 127.0.0.1 >NUL
EXIT
-----------------------------------------
to start nginx and php but when accessing http://localhost nothing is displayed.
where am i going wrong please guys?
thank you