Moving to Hetzner

This commit is contained in:
me@asxp.io 2023-08-21 01:50:56 +02:00
parent 5b40624c19
commit 202c24341b
12 changed files with 128 additions and 14 deletions

View file

@ -1,7 +1,7 @@
#asxp.io test gpg sign
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
#listen [::]:443 ssl http2;
server_name asxp.io www.asxp.io;
root /srv/http/asxpio;
@ -22,6 +22,6 @@ server {
ssl_certificate /etc/letsencrypt/live/asxp.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/asxp.io/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
#include /etc/letsencrypt/options-ssl-nginx.conf;
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}

22
sites-available/builds Normal file
View file

@ -0,0 +1,22 @@
server {
server_name builds.asxp.io;
#listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/asxp.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/asxp.io/privkey.pem;
root /srv/ftp/;
access_log /var/log/nginx/ftp.access.log;
error_log /var/log/nginx/ftp.error.log;
location / {
autoindex on;
autoindex_exact_size off;
autoindex_format html;
autoindex_localtime on;
}
}

View file

@ -1,6 +1,6 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
#listen [::]:443 ssl http2;
server_name git.asxp.io www.git.asxp.io;
location / {
@ -13,6 +13,6 @@ server {
ssl_certificate /etc/letsencrypt/live/asxp.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/asxp.io/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
#include /etc/letsencrypt/options-ssl-nginx.conf;
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}

View file

@ -1,6 +1,6 @@
server {
listen 80;
listen [::]:80;
#listen [::]:80;
server_name _;
return 301 https://$host$request_uri;
}

86
sites-available/jenkins Normal file
View file

@ -0,0 +1,86 @@
upstream jenkins {
keepalive 32; # keepalive connections
server 127.0.0.1:8420; # jenkins ip and port
}
# Required for Jenkins websocket agents
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name www.jenkins.asxp.io jenkins.asxp.io;
#listen [::]:80;
server_name www.jenkins.asxp.io jenkins.asxp.io;
root /var/run/jenkins/war/;
#index index.html;
server_name _;
return 444;
location / {
try_files $uri $uri/ =404;
}
}
server {
server_name jenkins.asxp.io;
#listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/asxp.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/asxp.io/privkey.pem;
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
root /var/run/jenkins/war/;
access_log /var/log/nginx/jenkins.access.log;
error_log /var/log/nginx/jenkins.error.log;
ignore_invalid_headers off;
location ~ "^/static/[0-9a-fA-F]{8}\/(.*)$" {
rewrite "^/static/[0-9a-fA-F]{8}\/(.*)" /$1 last;
}
location /userContent {
root /var/lib/jenkins/;
if (!-f $request_filename){
rewrite (.*) /$1 last;
break;
}
sendfile on;
}
location / {
sendfile off;
proxy_pass http://jenkins;
proxy_redirect default;
proxy_http_version 1.1;
# Required for Jenkins websocket agents
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_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;
proxy_max_temp_file_size 0;
#this is the maximum upload size
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffering off;
proxy_request_buffering off; # Required for HTTP CLI commands
proxy_set_header Connection ""; # Clear for keepalive
}
}

View file

@ -1,11 +1,11 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
#listen [::]:443 ssl http2;
server_name uptime.asxp.io www.uptime.asxp.io;
location / {
proxy_pass http://localhost:3001/;
proxy_pass http://localhost:3001;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
@ -16,6 +16,6 @@ location / {
ssl_certificate /etc/letsencrypt/live/asxp.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/asxp.io/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
#include /etc/letsencrypt/options-ssl-nginx.conf;
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}

1
sites-enabled/asxp.io Symbolic link
View file

@ -0,0 +1 @@
/etc/nginx/sites-available/asxp.io

1
sites-enabled/builds Symbolic link
View file

@ -0,0 +1 @@
/etc/nginx/sites-available/builds

1
sites-enabled/gitea Symbolic link
View file

@ -0,0 +1 @@
/etc/nginx/sites-available/gitea

1
sites-enabled/https Symbolic link
View file

@ -0,0 +1 @@
/etc/nginx/sites-available/https

1
sites-enabled/jenkins Symbolic link
View file

@ -0,0 +1 @@
/etc/nginx/sites-available/jenkins

1
sites-enabled/uptime Symbolic link
View file

@ -0,0 +1 @@
/etc/nginx/sites-available/uptime