my website work pefectly on apache service, but on nginx some functions do not work (api)
this my nginx config ! pleas help me
server {
server_name www.domain.com;
rewrite ^(.*) http://domain.com$1 permanent;
}
server {
listen 80;
access_log off;
error_log off;
root /var/www/html/domain.com;
include /etc/nginx/conf/ddos2.conf;
index index.php index.html index.htm;
server_name domain.com;
#///////////////////////////////////////////////////////
#///////////////////////////////////////////////////////
#Run all the websites,if you use your rule, comment or delete the line below (AAA)
#include /etc/nginx/conf/all.conf;
#If you use your rule, comment or delete above line, and Uncoment 3 lines belows and set your rule within it.. (BBB)
location / {
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php/$1 last;
}
}
# Rule cho wordpress + Plugin wp super cache. (CCC)
#include /etc/nginx/conf/supercache.conf;
# Rule cho wordpress + Plugin W3 Total Cache. (DDD)
#include /etc/nginx/conf/w3totalcache.conf;
#Do not delete the bottom line, if you delete google pagespeed function will not work!!
#include /etc/nginx/ngx_pagespeed.conf;
#security, sql injection Propeller ....(uncoment if you want to use). Because some website plugins do not run with this config, so VPSSIM to turn off default
#include /etc/nginx/conf/block.conf;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 256k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME /var/www/html/domain.com$fastcgi_script_name;
#fastcgi_param HTTPS on;
}
location /fastdl {
autoindex_exact_size on;
autoindex on;
}
include /etc/nginx/conf/staticfiles.conf;
#include /etc/nginx/conf/phpstatus.conf;
include /etc/nginx/conf/drop.conf;
#include /etc/nginx/conf/errorpage.conf;
}
this my nginx config ! pleas help me
server {
server_name www.domain.com;
rewrite ^(.*) http://domain.com$1 permanent;
}
server {
listen 80;
access_log off;
error_log off;
root /var/www/html/domain.com;
include /etc/nginx/conf/ddos2.conf;
index index.php index.html index.htm;
server_name domain.com;
#///////////////////////////////////////////////////////
#///////////////////////////////////////////////////////
#Run all the websites,if you use your rule, comment or delete the line below (AAA)
#include /etc/nginx/conf/all.conf;
#If you use your rule, comment or delete above line, and Uncoment 3 lines belows and set your rule within it.. (BBB)
location / {
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php/$1 last;
}
}
# Rule cho wordpress + Plugin wp super cache. (CCC)
#include /etc/nginx/conf/supercache.conf;
# Rule cho wordpress + Plugin W3 Total Cache. (DDD)
#include /etc/nginx/conf/w3totalcache.conf;
#Do not delete the bottom line, if you delete google pagespeed function will not work!!
#include /etc/nginx/ngx_pagespeed.conf;
#security, sql injection Propeller ....(uncoment if you want to use). Because some website plugins do not run with this config, so VPSSIM to turn off default
#include /etc/nginx/conf/block.conf;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 256k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME /var/www/html/domain.com$fastcgi_script_name;
#fastcgi_param HTTPS on;
}
location /fastdl {
autoindex_exact_size on;
autoindex on;
}
include /etc/nginx/conf/staticfiles.conf;
#include /etc/nginx/conf/phpstatus.conf;
include /etc/nginx/conf/drop.conf;
#include /etc/nginx/conf/errorpage.conf;
}