ngoduykhanh / wireguard-ui

Wireguard web interface
MIT License
3.77k stars 464 forks source link

future request ssl #570

Open mardock2009 opened 2 months ago

mardock2009 commented 2 months ago

ssl support can you add https support insteed of http?

kenairock commented 1 month ago

use nginx proxy pass here's my config:

$ sudo nano /etc/nginx/sites-enabled/wgui.conf

this redirect 80 to 443

server { listen 80; listen [::]:80;

server_name <hostname>;

location / {
    return 301 https://$host$request_uri;
}

}

server { listen 443 ssl http2; listen [::]:443 ssl http2;

include /etc/nginx/options-ssl-nginx.conf;

root /var/www/html;
index index.html;

server_name <hostname>;

location / {
    proxy_pass http://localhost:5000;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Nginx-Proxy true;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    client_max_body_size 25M;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /\.ht {
    deny all;
}

}