I have three hosts in Plesk. One of them requires one of the specified ports.
I normally write nginx.conf in Plesk nginx add directive.
For example, set the standby port to 33000.
When I access 'http://ccc.sample.com', I get an error due to repeated redirects(ERR_TOO_MANY_REDIRECTS).
I tried changing $http_port to $host, but I could not.
I created nginx/conf.d/my.conf. And specify upstream. I could not do it.
I write in nginx.conf(/etc/nginx/nginx.conf) without going through Plesk. Then I can access http://ccc.sample.com and go to 33000.
Is Plesk executing the following processing and it is judged to be a redirect repeatedly?
Start access
Ignoring PLESK and writing it in nginx.conf, no redirection will occur. But I'm using Plesk. I would like to manage using Plesk as much as possible. And I look at the contents of Plesk's nginx.conf and copy the certificate to nginx.conf. This is a brute force way. In this case, I do not know if problems will occur when the Let's encrypt certificate is updated. How can I get through this port 33000 using Plesk?
---
CentOS 7.5 / Nginx 1.13.8 / Plesk 17.8.11
I normally write nginx.conf in Plesk nginx add directive.
For example, set the standby port to 33000.
This item is described only this.location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_pass http://localhost:33000;
}
When I access 'http://ccc.sample.com', I get an error due to repeated redirects(ERR_TOO_MANY_REDIRECTS).
I tried changing $http_port to $host, but I could not.
I created nginx/conf.d/my.conf. And specify upstream. I could not do it.
/etc/nginx/conf.d/my.cnf
upstream backend {
server XXX.XXX.XXX.XXX:33000;
}
nginx add directive(plesk)
location /
...
proxy_pass http://backend;
}
I write in nginx.conf(/etc/nginx/nginx.conf) without going through Plesk. Then I can access http://ccc.sample.com and go to 33000.
Is Plesk executing the following processing and it is judged to be a redirect repeatedly?
Start access
- nginx.conf
- server.conf(/etc/nginx/plesk.conf.d/server.conf)
- 2nd nginx.conf(/etc/nginx/plesk.conf.d/vhosts/SUBDOMAIN.conf)
- Plesk's nginx.conf(/var/www/vhosts/system/SUBDOMAIN/conf/nginx.conf)) = Plesk UI (nginx add directive column)
Ignoring PLESK and writing it in nginx.conf, no redirection will occur. But I'm using Plesk. I would like to manage using Plesk as much as possible. And I look at the contents of Plesk's nginx.conf and copy the certificate to nginx.conf. This is a brute force way. In this case, I do not know if problems will occur when the Let's encrypt certificate is updated. How can I get through this port 33000 using Plesk?
---
CentOS 7.5 / Nginx 1.13.8 / Plesk 17.8.11
Last edited: