• Nginx rule

  • Share experiences using VPS, Ask & Answer, ...

Share experiences using VPS, Ask & Answer, ...
 #3596  by glauciolacerda
 14 Dec 2018 01:10
I bought a PHP script for my site and it tells me to change a rule in nginx:
server {
     listen 80 default_server;
     server_name default;
     root /home/xxxx.com.br/public_html/playlist;

     index.html index.htm index.php;

     charset utf-8;

     location / {
         try_files $ uri $ uri / /index.php?$query_string;
     }

     location = /favicon.ico {access_log off; log_not_found off; }
     location = /robots.txt {access_log off; log_not_found off; }

     access_log off;
     error_log /var/log/nginx/default-error.log error;

     error_page 404 /index.php;

     location ~ \ .php $ {
         fastcgi_split_path_info ^ (. + \. php) (/.+) $;
         fastcgi_pass unix: /var/run/php5-fpm.sock;
         fastcgi_index index.php;
         include fastcgi_params;
     }

     location ~ /\.ht {
         deny all;
     }
}

But when I do this, even VPSSIM gives error. Is this rule harmful to my server?
Get 25 USD Free To USE VPSSIM
 #3597  by glauciolacerda
 14 Dec 2018 07:41
I just installed this PHP script on my other VPS which is with CPanel and it worked normal, I really need to install this rule on nginx to work.
 #3598  by owsadmin
 14 Dec 2018 18:31
@glauciolacerda, you check the error.log ?
Check this error logs, if you can send me a PM with script link and i will check in my vpssim lab.

Dá uma checada nos logs de erro, se puder me manda por mp o script (link) para eu dar uma olhada e tentar ajudar.
nguyenoanh liked this
Get 25 USD Free To USE VPSSIM