Compare commits
2 Commits
0537f1b287
...
28778e5877
Author | SHA1 | Date | |
---|---|---|---|
28778e5877 | |||
8613e2f680 |
38
nginx/nginx.conf
Executable file
38
nginx/nginx.conf
Executable file
@ -0,0 +1,38 @@
|
||||
#user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
#include /etc/nginx/modules-enabled/*.conf;
|
||||
pcre_jit on;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
keepalive_timeout 65;
|
||||
gzip off;
|
||||
ssl_ciphers "EECDH+AESGCM:AES256+EECDH";
|
||||
ssl_protocols TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
add_header Strict-Transport-Security "max-age-63072000; includeSubdomains; preload";
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header X-Content-Options nosniff;
|
||||
ssl_session_tickets off;
|
||||
server_tokens off;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
resolver 8.8.8.8 8.8.4.4 valid=300s; # Google DNS
|
||||
resolver_timeout 5s;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
31
nginx/sites-available/git.eldon.me
Normal file
31
nginx/sites-available/git.eldon.me
Normal file
@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name git.eldon.me;
|
||||
return 301 https://git.eldon.me$request_uri;
|
||||
|
||||
# Redirect non-https traffic to https
|
||||
# if ($scheme != "https") {
|
||||
# return 301 https://$host$request_uri;
|
||||
# } # managed by Certbot
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name git.eldon.me;
|
||||
ssl_certificate /etc/letsencrypt/live/aprilandtrey.us/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/aprilandtrey.us/privkey.pem; # managed by Certbot
|
||||
|
||||
root /var/www/git.eldon.me/;
|
||||
location / {
|
||||
client_max_body_size 1024M;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass http://gitea:3000;
|
||||
proxy_connect_timeout 600;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
send_timeout 600;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user