removed certbot things

This commit is contained in:
Aaro Koivukangas
2023-11-28 15:36:54 +02:00
parent dd6f1e61f0
commit 2b851117b0
13 changed files with 27 additions and 240 deletions
+1
View File
@@ -0,0 +1 @@
.htpasswd
+3 -1
View File
@@ -1,8 +1,10 @@
FROM nginx FROM nginx
# remove default files # remove default files
RUN rm /etc/nginx/nginx.conf /etc/nginx/conf.d/default.conf #RUN rm /etc/nginx/nginx.conf /etc/nginx/conf.d/default.conf
#COPY content /usr/share/nginx/html
COPY conf /etc/nginx COPY conf /etc/nginx
#VOLUME /usr/share/nginx/html
VOLUME /etc/nginx VOLUME /etc/nginx
+1 -1
View File
@@ -1,4 +1,4 @@
user http; #user http;
worker_processes 1; worker_processes 1;
#error_log logs/error.log; #error_log logs/error.log;
@@ -1,6 +1,6 @@
server { server {
server_name brewery.pumppi.dev; server_name brewery.pumppi.dev;
listen 80;
location / { location / {
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;
@@ -8,31 +8,4 @@ server {
proxy_set_header Host $server_name; proxy_set_header Host $server_name;
proxy_pass http://127.0.0.1:5555; proxy_pass http://127.0.0.1:5555;
} }
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/pumppi.dev/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/pumppi.dev/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = brewery.pumppi.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name brewery.pumppi.dev;
return 404; # managed by Certbot
} }
+1 -23
View File
@@ -1,30 +1,8 @@
server { server {
listen 443 ssl; # managed by Certbot
listen [::]:443 ssl; # managed by Certbot
server_name cal.pumppi.dev; server_name cal.pumppi.dev;
ssl_certificate /etc/letsencrypt/live/pumppi.dev/fullchain.pem; # managed by Certbot listen 80;
ssl_certificate_key /etc/letsencrypt/live/pumppi.dev/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / { location / {
proxy_pass http://127.0.0.1:5232; proxy_pass http://127.0.0.1:5232;
} }
}
server {
if ($host = cal.pumppi.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name cal.pumppi.dev;
return 404; # managed by Certbot
} }
+1 -30
View File
@@ -1,5 +1,6 @@
server { server {
server_name git.pumppi.dev; server_name git.pumppi.dev;
listen 80;
root /var/www/html/cgit/cgi; root /var/www/html/cgit/cgi;
try_files $uri @cgit; try_files $uri @cgit;
@@ -12,34 +13,4 @@ server {
fastcgi_param HTTP_HOST $server_name; fastcgi_param HTTP_HOST $server_name;
fastcgi_pass unix:/run/fcgiwrap/fcgiwrap-http.sock; fastcgi_pass unix:/run/fcgiwrap/fcgiwrap-http.sock;
} }
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/pumppi.dev/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/pumppi.dev/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = git.pumppi.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name git.pumppi.dev;
listen 80;
return 404; # managed by Certbot
} }
@@ -1,11 +1,5 @@
server { server {
listen 443 ssl; listen 80;
listen [::]:443 ssl;
server_name mine.pumppi.dev;
ssl_certificate /etc/letsencrypt/live/pumppi.dev/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/pumppi.dev/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf;
location / { location / {
proxy_pass http://127.0.0.1:25565; proxy_pass http://127.0.0.1:25565;
@@ -1,62 +0,0 @@
server {
root /var/www/html;
server_name pihole.pumppi.dev;
autoindex off;
index pihole/index.php index.php index.html index.htm;
location / {
expires max;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_param FQDN true;
auth_basic "Restricted"; # For Basic Auth
auth_basic_user_file /etc/nginx/.htpasswd; # For Basic Auth
}
location /*.js {
index pihole/index.js;
auth_basic "Restricted"; # For Basic Auth
auth_basic_user_file /etc/nginx/.htpasswd; # For Basic Auth
}
location /admin {
root /var/www/html;
index index.php index.html index.htm;
auth_basic "Restricted"; # For Basic Auth
auth_basic_user_file /etc/nginx/.htpasswd; # For Basic Auth
}
location ~ /\.ht {
deny all;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/pumppi.dev/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/pumppi.dev/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = pihole.pumppi.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name pihole.pumppi.dev;
return 404; # managed by Certbot
}
+2 -36
View File
@@ -1,44 +1,10 @@
server { server {
listen 443 ipv6only=off default_server ssl; #listen 443 ipv6only=off default_server ssl;
server_name pumppi.dev www.pumppi.dev; server_name pumppi.dev www.pumppi.dev;
listen 80;
include /etc/nginx/letsencrypt.conf;
ssl_certificate /etc/letsencrypt/live/pumppi.dev/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/pumppi.dev/privkey.pem; # managed by Certbot
location / { location / {
proxy_pass http://127.0.0.1:8000; proxy_pass http://127.0.0.1:8000;
} }
}
server {
if ($host = www.pumppi.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = pumppi.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name pumppi.dev www.pumppi.dev;
return 404; # managed by Certbot
} }
@@ -1,32 +1,8 @@
server { server {
server_name reaktor.pumppi.dev; server_name reaktor.pumppi.dev;
listen 80;
location / { location / {
proxy_pass http://127.0.0.1:5050; proxy_pass http://127.0.0.1:5050;
} }
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/pumppi.dev/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/pumppi.dev/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = reaktor.pumppi.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name reaktor.pumppi.dev;
return 404; # managed by Certbot
} }
@@ -1,33 +1,8 @@
server { server {
server_name tsoha.pumppi.dev; server_name tsoha.pumppi.dev;
listen 80;
location / { location / {
proxy_pass http://127.0.0.1:5000; proxy_pass http://127.0.0.1:5000;
} }
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/pumppi.dev/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/pumppi.dev/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = tsoha.pumppi.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name tsoha.pumppi.dev;
return 404; # managed by Certbot
} }
@@ -1 +0,0 @@
/etc/nginx/sites-available/pihole.pumppi.dev
+14
View File
@@ -0,0 +1,14 @@
# This file contains important security parameters. If you modify this file
# manually, Certbot will be unable to automatically provide future security
# updates. Instead, Certbot will print and log an error message with a path to
# the up-to-date file that you will need to refer to when manually updating
# this file. Contents are based on https://ssl-config.mozilla.org
ssl_session_cache shared:le_nginx_SSL:10m;
ssl_session_timeout 1440m;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";