diff --git a/crontab/nuc_root_crontab b/crontab/nuc_root_crontab new file mode 100644 index 0000000..f7ebc54 --- /dev/null +++ b/crontab/nuc_root_crontab @@ -0,0 +1,28 @@ +# Edit this file to introduce tasks to be run by cron. +# +# Each task to run has to be defined through a single line +# indicating with different fields when the task will be run +# and what command to run for the task +# +# To define the time you can provide concrete values for +# minute (m), hour (h), day of month (dom), month (mon), +# and day of week (dow) or use '*' in these fields (for 'any').# +# Notice that tasks will be started based on the cron's system +# daemon's notion of time and timezones. +# +# Output of the crontab jobs (including errors) is sent through +# email to the user the crontab file belongs to (unless redirected). +# +# For example, you can run a backup of all your user accounts +# at 5 a.m every week with: +# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ +# +# For more information see the manual pages of crontab(5) and cron(8) +# +# m h dom mon dow command + +0 5 * * * cd /home/shadow8t4/git/system-management/bash/ && ./matrix_backup.sh +15 5 * * * cd /home/shadow8t4/git/system-management/bash/ && ./mastodon_backup.sh +0 6 * * 1 cd /home/shadow8t4/git/system-management/bash/ && ./mastodon_maintenance_weekly.sh +15 6 * * * cd /home/shadow8t4/git/system-management/bash/ && ./mastodon_maintenance_daily.sh + diff --git a/nginx/default b/nginx/default new file mode 100644 index 0000000..587a11c --- /dev/null +++ b/nginx/default @@ -0,0 +1,91 @@ +## +# You should look at the following URL's in order to grasp a solid understanding +# of Nginx configuration files in order to fully unleash the power of Nginx. +# https://www.nginx.com/resources/wiki/start/ +# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ +# https://wiki.debian.org/Nginx/DirectoryStructure +# +# In most cases, administrators will remove this file from sites-enabled/ and +# leave it as reference inside of sites-available where it will continue to be +# updated by the nginx packaging team. +# +# This file will automatically load configuration files provided by other +# applications, such as Drupal or Wordpress. These applications will be made +# available underneath a path with that package name, such as /drupal8. +# +# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. +## + +# Default server configuration +# +#server { + #listen 80 default_server; + #listen [::]:80 default_server; + + # SSL configuration + # + # listen 443 ssl default_server; + # listen [::]:443 ssl default_server; + # + # Note: You should disable gzip for SSL traffic. + # See: https://bugs.debian.org/773332 + # + # Read up on ssl_ciphers to ensure a secure configuration. + # See: https://bugs.debian.org/765782 + # + # Self signed certs generated by the ssl-cert package + # Don't use them in a production server! + # + # include snippets/snakeoil.conf; + + #root /var/www/html; + + # Add index.php to the list if you are using PHP + #index index.html index.htm index.nginx-debian.html; + + #server_name _; + + #location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + #try_files $uri $uri/ =404; + #} + + # pass PHP scripts to FastCGI server + # + #location ~ \.php$ { + # include snippets/fastcgi-php.conf; + # + # # With php-fpm (or other unix sockets): + # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + # # With php-cgi (or other tcp sockets): + # fastcgi_pass 127.0.0.1:9000; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +#} + + +# Virtual Host configuration for example.com +# +# You can move that to a different file under sites-available/ and symlink that +# to sites-enabled/ to enable it. +# +#server { +# listen 80; +# listen [::]:80; +# +# server_name example.com; +# +# root /var/www/example.com; +# index index.html; +# +# location / { +# try_files $uri $uri/ =404; +# } +#} diff --git a/nginx/default.dpkg-dist b/nginx/default.dpkg-dist new file mode 100644 index 0000000..9117e37 --- /dev/null +++ b/nginx/default.dpkg-dist @@ -0,0 +1,91 @@ +## +# You should look at the following URL's in order to grasp a solid understanding +# of Nginx configuration files in order to fully unleash the power of Nginx. +# https://www.nginx.com/resources/wiki/start/ +# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ +# https://wiki.debian.org/Nginx/DirectoryStructure +# +# In most cases, administrators will remove this file from sites-enabled/ and +# leave it as reference inside of sites-available where it will continue to be +# updated by the nginx packaging team. +# +# This file will automatically load configuration files provided by other +# applications, such as Drupal or Wordpress. These applications will be made +# available underneath a path with that package name, such as /drupal8. +# +# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. +## + +# Default server configuration +# +server { + listen 80 default_server; + listen [::]:80 default_server; + + # SSL configuration + # + # listen 443 ssl default_server; + # listen [::]:443 ssl default_server; + # + # Note: You should disable gzip for SSL traffic. + # See: https://bugs.debian.org/773332 + # + # Read up on ssl_ciphers to ensure a secure configuration. + # See: https://bugs.debian.org/765782 + # + # Self signed certs generated by the ssl-cert package + # Don't use them in a production server! + # + # include snippets/snakeoil.conf; + + root /var/www/html; + + # Add index.php to the list if you are using PHP + index index.html index.htm index.nginx-debian.html; + + server_name _; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } + + # pass PHP scripts to FastCGI server + # + #location ~ \.php$ { + # include snippets/fastcgi-php.conf; + # + # # With php-fpm (or other unix sockets): + # fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; + # # With php-cgi (or other tcp sockets): + # fastcgi_pass 127.0.0.1:9000; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + + +# Virtual Host configuration for example.com +# +# You can move that to a different file under sites-available/ and symlink that +# to sites-enabled/ to enable it. +# +#server { +# listen 80; +# listen [::]:80; +# +# server_name example.com; +# +# root /var/www/example.com; +# index index.html; +# +# location / { +# try_files $uri $uri/ =404; +# } +#} diff --git a/nginx/ebgamesreal.conf b/nginx/ebgamesreal.conf new file mode 100644 index 0000000..1009d8e --- /dev/null +++ b/nginx/ebgamesreal.conf @@ -0,0 +1,22 @@ +## +# EB Games Real Dot Live +## + +server { + + listen 42069 default_server; + listen [::]:42069 default_server; + + root /home/shadow8t4/ebgamesreal-live/; + + index index.html index.htm index.nginx-debian.html; + + server_name ebgamesreal.live; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } +} + diff --git a/nginx/landing-page.conf b/nginx/landing-page.conf new file mode 100644 index 0000000..2b54b17 --- /dev/null +++ b/nginx/landing-page.conf @@ -0,0 +1,22 @@ +## +# Werefox Software Landing Page +## + +server { + + listen 80 default_server; + listen [::]:80 default_server; + + root /home/shadow8t4/werefoxsoftware-landing-page/; + + index index.html index.htm index.nginx-debian.html; + + server_name pf.werefox.dev; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } +} + diff --git a/nginx/letter.conf b/nginx/letter.conf new file mode 100644 index 0000000..8197701 --- /dev/null +++ b/nginx/letter.conf @@ -0,0 +1,22 @@ +## +# Werefox Software Valentine Letter +## + +server { + + listen 6969 default_server; + listen [::]:6969 default_server; + + root /home/shadow8t4/werefoxsoftware-landing-page/letter/; + + index index.html index.htm index.nginx-debian.html; + + server_name letter.werefox.dev; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } +} + diff --git a/nginx/mastodon.conf b/nginx/mastodon.conf new file mode 100644 index 0000000..15b7586 --- /dev/null +++ b/nginx/mastodon.conf @@ -0,0 +1,76 @@ +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +} + +server { + listen 8888; + listen [::]:8888; + server_name masto.werefox.dev; + + root /home/mastodon/live/public; + + client_max_body_size 80m; + + gzip on; + gzip_disable "msie6"; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + + add_header Strict-Transport-Security "max-age=31536000"; + + location / { + try_files $uri @proxy; + } + + location ~ ^/(emoji|packs|system/accounts/avatars|system/media_attachments/files) { + add_header Cache-Control "public, max-age=31536000, immutable"; + try_files $uri @proxy; + } + + location /sw.js { + add_header Cache-Control "public, max-age=0"; + try_files $uri @proxy; + } + + location @proxy { + 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 https; + proxy_set_header Proxy ""; + proxy_pass_header Server; + + proxy_pass http://127.0.0.1:3000; + proxy_buffering off; + proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + tcp_nodelay on; + } + + location /api/v1/streaming { + 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 https; + proxy_set_header Proxy ""; + + proxy_pass http://127.0.0.1:4000; + proxy_buffering off; + proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + tcp_nodelay on; + } + + error_page 500 501 502 503 504 /500.html; +} diff --git a/nginx/pinafore.conf b/nginx/pinafore.conf new file mode 100644 index 0000000..98774b2 --- /dev/null +++ b/nginx/pinafore.conf @@ -0,0 +1,12 @@ +# werefoxsoftware.com Redirect + +server { + listen 80; + server_name pina.werefoxsoftware.com; + return 301 $scheme://pina.werefox.dev$request_uri; +} +server { + listen 443; + server_name pina.werefoxsoftware.com; + return 301 $scheme://pina.werefox.dev$request_uri; +} diff --git a/nginx/riot-client.conf b/nginx/riot-client.conf new file mode 100644 index 0000000..e87c080 --- /dev/null +++ b/nginx/riot-client.conf @@ -0,0 +1,22 @@ +## +# Riot Client +## + +server { + + listen 8808 default_server; + listen [::]:8808 default_server; + + root /home/shadow8t4/riot-v1.6.0/; + + index index.html index.htm index.nginx-debian.html; + + server_name riot.werefox.dev; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } +} +