Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Ideally, you don’t want to nest location blocks, and from looking over your configuration, that’s where the issue is stemming from. Each location block should ideally only handle one thing. So if we take your current server block and rewrite it without nesting and break it apart, it looks like:
server {
listen 139.59.10.214:80;
servername chetantest.tk www.chetantest.tk;
root /home/admin/web/chetantest.tk/publichtml;
index index.php index.html index.htm;
accesslog /var/log/nginx/domains/chetantest.tk.log combined;
accesslog /var/log/nginx/domains/chetantest.tk.bytes bytes;
error_log /var/log/nginx/domains/chetantest.tk.error.log error;
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass 127.0.0.1:9003;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
location /error/ {
alias /home/admin/web/chetantest.tk/document_errors/;
}
location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}
location /vstats/ {
alias /home/admin/web/chetantest.tk/stats/;
include /home/admin/web/chetantest.tk/stats/auth.conf*;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include /etc/nginx/conf.d/webmail.inc*;
include /home/admin/conf/web/nginx.chetantest.tk.conf*;
}