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.
Hello,
First, I can see you have a lot of redirects which might be causing the said issue :
## REDIRECT domainname.com/index(.php) to domainname.com/
if ($request_uri ~ ^(.*/)index(?:\.php)?$) {
return 301 $1;
}
# OR USE :
## REDIRECT domainname.com/index(.html) to domainname.com/
if ($request_uri ~ ^(.*/)index(?:\.html)?$) {
return 301 $1;
}
## REDIRECT domainname.com/index.html to domainname.com/index
#if ($request_uri ~ ^(.+)\.html$) {
# return 301 $1;
#}
# To remove a slash at the end:
rewrite ^/(.*)/$ /$1 permanent;
Please try removing them, restarting Nginx to see if this would work properly without them.
As for your location, block, I can say it’s looking alright :
location / {
# URLs to attempt, including pretty ones.
try_files $uri $uri/ /index.php?$query_string;
index index.html index.php index.py;
autoindex on;
}
Now, if you want to serve another location block for your WHMCS installation, you should be able to type in
location /whmcs {
# URLs to attempt, including pretty ones.
try_files $uri $uri/ /index.php?$query_string;
}
Please note, you should put location /PATH/TO/FOLDER
The path to the folder should be based on your Document root. Example :
Your DocumentRoot is /var/www/html/domain.com. If you want to create a location block for a folder located in /var/www/html/domain.com/one/WHMCS, the location block should start the following way:
location /one/whmcs