index,nginx,web
This commit is contained in:
parent
785fdeb3f0
commit
f0b95a2fe0
5 changed files with 11 additions and 11 deletions
8
in/public/nginx/configure.rst
Normal file
8
in/public/nginx/configure.rst
Normal file
|
@ -0,0 +1,8 @@
|
|||
Configure
|
||||
=========
|
||||
|
||||
* /etc/nginx/nginx.conf
|
||||
|
||||
.. warning:: define headers at 1 place only
|
||||
|
||||
.. todo:: extract from server
|
8
in/public/nginx/index.rst
Normal file
8
in/public/nginx/index.rst
Normal file
|
@ -0,0 +1,8 @@
|
|||
#####
|
||||
NginX
|
||||
#####
|
||||
|
||||
.. toctree::
|
||||
|
||||
configure
|
||||
serve
|
65
in/public/nginx/serve.rst
Normal file
65
in/public/nginx/serve.rst
Normal file
|
@ -0,0 +1,65 @@
|
|||
Serve
|
||||
=====
|
||||
|
||||
* /etc/nginx/sites-available/…
|
||||
|
||||
::
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
location "/mirrors" {
|
||||
root "/";
|
||||
autoindex on;
|
||||
}
|
||||
location "/" {
|
||||
root "/data/http";
|
||||
autoindex on;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name "sous.domaine.tld";
|
||||
ssl_certificate "/etc/nginx/certificates/nom.crt";
|
||||
ssl_certificate_key "/etc/nginx/certificates/nom.key";
|
||||
location "/static" {
|
||||
root "/data/https";
|
||||
default_type "text/html";
|
||||
index "index.html";
|
||||
}
|
||||
location "/" {
|
||||
proxy_pass "http://127.0.0.1:8069";
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
||||
|
||||
Certificates
|
||||
------------
|
||||
|
||||
::
|
||||
|
||||
application/x-x509-ca-cert crt der pem;
|
||||
application/x-x509-user-cert pfx;
|
||||
|
||||
Check client certificate
|
||||
------------------------
|
||||
|
||||
::
|
||||
|
||||
location /protected {
|
||||
ssl_client_certificate ca.crt;
|
||||
ssl_verify_client on;
|
||||
}
|
||||
|
||||
Redirect http to https
|
||||
----------------------
|
||||
|
||||
::
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
return 301 https://${host}${request_uri};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue