mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2024-12-28 01:49:26 +01:00
Update _index.en.md
This commit is contained in:
parent
0c387cd818
commit
f11d0d776f
@ -263,7 +263,7 @@ There are two ways:
|
||||
```sh
|
||||
cat > /etc/nginx/sites-available/rustdesk.conf << EOF
|
||||
server {
|
||||
server_name <YOUR_DOMAIN>;
|
||||
server_name <YOUR_DOMAIN>;
|
||||
location / {
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
@ -280,7 +280,7 @@ Run `cat /etc/nginx/sites-available/rustdesk.conf` to make sure its content is c
|
||||
```sh
|
||||
cat > /etc/nginx/conf.d/rustdesk.conf << EOF
|
||||
server {
|
||||
server_name <YOUR_DOMAIN>;
|
||||
server_name <YOUR_DOMAIN>;
|
||||
location / {
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
@ -310,7 +310,7 @@ If it prompts `Enter email address (used for urgent renewal and security notices
|
||||
Finally, the content of `rustdesk.conf` should be like this:
|
||||
```
|
||||
server {
|
||||
server_name <YOUR_DOMAIN>;
|
||||
server_name <YOUR_DOMAIN>;
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@ -322,17 +322,16 @@ server_name <YOUR_DOMAIN>;
|
||||
ssl_certificate_key /etc/letsencrypt/live/<YOUR_DOMAIN>/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = <YOUR_DOMAIN>) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
server_name <YOUR_DOMAIN>;
|
||||
server_name <YOUR_DOMAIN>;
|
||||
listen 80;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@ -363,7 +362,86 @@ Solution: it may be caused by firewall, please refer to https://rustdesk.com/doc
|
||||
Notice: Run `sudo service nginx restart` if you change the `rustdesk.conf` manually.
|
||||
|
||||
#### 7. Login to the web page
|
||||
* Open https://<YOUR_DOMAIN> in the browser, log in using the default user name "admin" and password "test1234", then change the password to your own.
|
||||
* Open `https://<YOUR_DOMAIN>` in the browser, log in using the default user name "admin" and password "test1234", then change the password to your own.
|
||||
|
||||
### 8. Add WebSocket Secure (WSS) support for the id server and relay server to enable secure communication for the web client.
|
||||
|
||||
Add the following configuration to the first server section of the `/etc/nginx/.../rustdesk.conf` file, then restart the Nginx service.
|
||||
|
||||
```
|
||||
location /ws/id {
|
||||
proxy_pass http://localhost:21118;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $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;
|
||||
}
|
||||
|
||||
location /ws/relay {
|
||||
proxy_pass http://localhost:21119;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $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;
|
||||
}
|
||||
```
|
||||
|
||||
The full configuration is
|
||||
|
||||
```
|
||||
server {
|
||||
server_name <YOUR_DOMAIN>;
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://127.0.0.1:21114/;
|
||||
}
|
||||
|
||||
location /ws/id {
|
||||
proxy_pass http://localhost:21118;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $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;
|
||||
}
|
||||
|
||||
location /ws/relay {
|
||||
proxy_pass http://localhost:21119;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $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;
|
||||
}
|
||||
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/<YOUR_DOMAIN>/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/<YOUR_DOMAIN>/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = <YOUR_DOMAIN>) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
server_name <YOUR_DOMAIN>;
|
||||
listen 80;
|
||||
return 404; # managed by Certbot
|
||||
}
|
||||
```
|
||||
|
||||
### SELinux
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user