Answer the question
In order to leave comments, you need to log in
How to enable https in nginx?
Greetings! You need to set up https on your home nas. Operating system: openmedia vault. Needed to install owncloud and it requires https. Work with it goes exclusively on the local network with the indication of ip in the address bar. In the tutorials, I found only the setting for the domain
Answer the question
In order to leave comments, you need to log in
My nginx config as https proxy
server {
listen 443;
server_name owncloud.mydomain.com;
ssl on;
ssl_certificate /etc/nginx/ssl/owncloud.mydomain.com/fullchain.pem;
ssl_certificate_key /etc/nginx/owncloud.mydomain.com/privkey.pem;
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";
}
}
server {
listen 80;
listen [::]:80;
server_name owncloud.mydomain.com;
rewrite ^ https://owncloud.mydomain.com$request_uri? permanent;.
}
Try this solution: https://letsencrypt.org/. Expands in a few clicks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question