Answer the question
In order to leave comments, you need to log in
How to disable redirect to HTTPS in nginx for one address?
There is such a conf:
server{
listen 80;
location / {
return 301 https://swight.live$request_uri;
}
location ~ /bot/ {
...
}
}
server {
listen 443 ssl;
location / {
...
}
Answer the question
In order to leave comments, you need to log in
location ~ /vkbot/ {
root /home/www/vkbot/;
try_files $uri $uri/ /index.php?$args;
index index.php index.html;
...
}
curl http://swight.live/vkbot/
nginx will look for files in the /home/www/vkbot/vkbot/ folder . Not what you wanted, right? location /vkbot/ {
root /home/www/;
try_files $uri $uri/ /vkbot/index.php?$args;
index index.php index.html;
...
}
Try to change again
on the
try moving location = /bot/ in the config above location / (note - there is a sign = =
In general, read about nginx location order priority https://nginx.org/en/docs/http/ngx_http_core_modul...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question