Answer the question
In order to leave comments, you need to log in
How to set a rule in nginx only for a subdomain?
Problem: https://domain.com redirects to http://domain.com/attempt/login/to/seafile
Given:
root domain domain.com
subdomain https://sub.domain.com/ - seafile server , their manual config via nginx:
server {
listen 80;
server_name sub.domain.com;
rewrite ^ https://$http_host$request_uri? permanent;
}
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/cacert.pem;
ssl_certificate_key /etc/ssl/privkey.pem;
server_name sub.domain.com;
# длинный конфиг #
fastcgi_param HTTPS on;
fastcgi_param HTTP_SCHEME https;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question