nginx/serve/redirect
This commit is contained in:
parent
2f41476240
commit
ca7a37f689
1 changed files with 13 additions and 3 deletions
|
@ -1,10 +1,9 @@
|
|||
*****
|
||||
Serve
|
||||
*****
|
||||
=====
|
||||
|
||||
* /etc/nginx/sites-available/…
|
||||
|
||||
.. code::
|
||||
::
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
@ -35,3 +34,14 @@ Serve
|
|||
}
|
||||
}
|
||||
|
||||
Redirect http to https
|
||||
----------------------
|
||||
|
||||
::
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
return 301 https://${host}${request_uri};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue