nginx templates
This commit is contained in:
parent
87bc16a142
commit
f5730b2477
8 changed files with 437 additions and 0 deletions
52
files/nginx/sites-enabled/fuz.re.conf
Executable file
52
files/nginx/sites-enabled/fuz.re.conf
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name fuz.re;
|
||||
root /var/www/fuz.re/public;
|
||||
|
||||
# SSL
|
||||
ssl_certificate /etc/letsencrypt/live/fuz.re/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/fuz.re/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/fuz.re/chain.pem;
|
||||
|
||||
# security
|
||||
include snippets/security.conf;
|
||||
|
||||
# index.html fallback
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# index.php fallback
|
||||
location ~ ^/api/ {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
# additional config
|
||||
include snippets/general.conf;
|
||||
}
|
||||
|
||||
# subdomains redirect
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name *.fuz.re;
|
||||
|
||||
# SSL
|
||||
ssl_certificate /etc/letsencrypt/live/fuz.re/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/fuz.re/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/fuz.re/chain.pem;
|
||||
return 301 https://fuz.re$request_uri;
|
||||
}
|
||||
|
||||
# HTTP redirect
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name .fuz.re;
|
||||
include snippets/letsencrypt.conf;
|
||||
|
||||
location / {
|
||||
return 301 https://fuz.re$request_uri;
|
||||
}
|
||||
}
|
||||
38
files/nginx/sites-enabled/matrix.fuz.re.conf
Executable file
38
files/nginx/sites-enabled/matrix.fuz.re.conf
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name matrix.fuz.re;
|
||||
|
||||
# SSL
|
||||
ssl_certificate /etc/letsencrypt/live/matrix.fuz.re/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/matrix.fuz.re/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/matrix.fuz.re/chain.pem;
|
||||
|
||||
# security
|
||||
include snippets/security.conf;
|
||||
|
||||
# logging
|
||||
access_log /var/log/nginx/matrix.fuz.re.access.log;
|
||||
error_log /var/log/nginx/matrix.fuz.re.error.log warn;
|
||||
|
||||
# reverse proxy
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
include snippets/proxy.conf;
|
||||
}
|
||||
|
||||
# additional config
|
||||
include snippets/general.conf;
|
||||
}
|
||||
|
||||
# HTTP redirect
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name matrix.fuz.re;
|
||||
include snippets/letsencrypt.conf;
|
||||
|
||||
location / {
|
||||
return 301 https://matrix.fuz.re$request_uri;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue