Revision b9381291
Added by David Sorber about 4 years ago
| configs/phalanx/01-netcfg.yaml | ||
|---|---|---|
|
# This file describes the network interfaces available on your system
|
||
|
# For more information, see netplan(5).
|
||
|
# This is the network config written by 'subiquity'
|
||
|
network:
|
||
|
version: 2
|
||
|
renderer: networkd
|
||
|
ethernets:
|
||
|
enp1s0f1:
|
||
|
dhcp4: yes
|
||
|
mtu: 9000
|
||
|
enp1s0f0:
|
||
|
dhcp4: yes
|
||
|
mtu: 9000
|
||
|
routes:
|
||
|
- to: 192.168.250.0/24
|
||
|
via: 0.0.0.0
|
||
|
metric: 20
|
||
|
link-local: [ ipv4 ]
|
||
|
dhcp4: true
|
||
|
dhcp4-overrides:
|
||
|
route-metric: 200
|
||
|
enp1s0f1:
|
||
|
link-local: [ ipv4 ]
|
||
|
dhcp4: false
|
||
|
optional: true
|
||
|
enp4s0:
|
||
|
dhcp4: yes
|
||
|
link-local: [ ipv4 ]
|
||
|
dhcp4: true
|
||
|
dhcp4-overrides:
|
||
|
route-metric: 100
|
||
|
enp5s0:
|
||
|
link-local: [ ipv4 ]
|
||
|
dhcp4: false
|
||
|
optional: true
|
||
|
version: 2
|
||
|
|
||
| configs/phalanx/apache/baikal.conf | ||
|---|---|---|
|
Alias /calendar /var/www/baikal/html
|
||
|
Alias /calendar/ /var/www/baikal/html/
|
||
|
|
||
|
<Directory "/var/www/baikal">
|
||
|
Options -Indexes
|
||
|
</Directory>
|
||
|
|
||
|
<Directory "/var/www/baikal/html">
|
||
|
Options None
|
||
|
Options +FollowSymlinks
|
||
|
AllowOverride All
|
||
|
</Directory>
|
||
| configs/phalanx/apache/git.conf | ||
|---|---|---|
|
PerlLoadModule Apache2::Redmine
|
||
|
|
||
|
Alias /git /var/www/grack/public
|
||
|
<Location /git>
|
||
|
PassengerBaseURI /git
|
||
|
PassengerAppRoot /var/www/grack
|
||
|
|
||
|
AuthType Basic
|
||
|
AuthName "Redmine git repositories"
|
||
|
Require valid-user
|
||
|
AuthUserFile /dev/null
|
||
|
|
||
|
PerlAccessHandler Apache::Authn::Redmine::access_handler
|
||
|
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
|
||
|
#RedmineDSN "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=/opt/bitnami/mysql/tmp/mysql.sock"
|
||
|
RedmineDSN "DBI:Pg:dbname=redmine;host=localhost"
|
||
|
RedmineDbUser "redmine"
|
||
|
RedmineDbPass "PASSWORD_GOES_HERE"
|
||
|
RedmineGitSmartHttp yes
|
||
|
</Location>
|
||
|
|
||
|
<Directory "/var/www/grack/public">
|
||
|
Options None
|
||
|
AllowOverride None
|
||
|
<IfVersion < 2.3 >
|
||
|
Order allow,deny
|
||
|
Allow from all
|
||
|
</IfVersion>
|
||
|
<IfVersion >= 2.3>
|
||
|
Require all granted
|
||
|
</IfVersion>
|
||
|
</Directory>
|
||
|
|
||
| configs/phalanx/apache/main.conf | ||
|---|---|---|
|
<VirtualHost *:80>
|
||
|
Redirect permanent / https://10.0.0.6
|
||
|
Redirect permanent / https://phalanx.homelinuxserver.org
|
||
|
</VirtualHost>
|
||
|
|
||
|
<VirtualHost _default_:443>
|
||
|
ServerName https://10.0.0.6:443
|
||
|
ServerName https://phalanx.homelinuxserver.org
|
||
|
ServerAdmin webmaster@localhost
|
||
|
|
||
|
DocumentRoot /var/www
|
||
| ... | ... | |
|
<Directory /var/www/>
|
||
|
Options Indexes FollowSymLinks MultiViews
|
||
|
AllowOverride None
|
||
|
Require all granted
|
||
|
Require all granted
|
||
|
</Directory>
|
||
|
|
||
|
Alias /htdocs /var/htdocs
|
||
|
<Directory /var/htdocs>
|
||
|
Require all granted
|
||
|
Require all granted
|
||
|
</Directory>
|
||
|
|
||
|
#WSGIScriptAlias /bfcs /home/dsorber/bfcs/app.wsgi
|
||
|
|
||
|
ErrorDocument 403 /error_pages/404.html
|
||
|
ErrorDocument 404 /error_pages/404.html
|
||
|
ErrorDocument 403 /error_pages/404.html
|
||
|
ErrorDocument 404 /error_pages/404.html
|
||
|
|
||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||
|
|
||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||
|
# alert, emerg.
|
||
|
LogLevel warn
|
||
|
|
||
|
SSLEngine On
|
||
|
SSLCertificateFile /etc/apache2/ssl/baranovich.crt
|
||
|
SSLCertificateKeyFile /etc/apache2/ssl/baranovich.key
|
||
|
SSLProtocol -all +TLSv1.2
|
||
|
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
|
||
|
SSLEngine On
|
||
|
SSLCertificateFile /etc/apache2/ssl/phalanx.crt
|
||
|
SSLCertificateKeyFile /etc/apache2/ssl/phalanx.key
|
||
|
SSLProtocol -all +TLSv1.3
|
||
|
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
|
||
|
|
||
|
# --- Redmine ---------------------------------------------------
|
||
|
PassengerAppRoot /srv/redmine
|
||
|
RailsBaseURI /redmine
|
||
|
Alias /redmine /var/www/redmine
|
||
|
<Directory /var/www/redmine>
|
||
|
Options Indexes FollowSymLinks MultiViews
|
||
|
AllowOverride None
|
||
|
Order allow,deny
|
||
|
allow from all
|
||
|
RailsBaseURI /redmine
|
||
|
</Directory>
|
||
|
|
||
|
# --- Nextcloud ------------------------------------------------
|
||
|
Alias /nextcloud "/var/www/nextcloud/"
|
||
|
<Directory /var/www/nextcloud/>
|
||
|
Options +FollowSymlinks
|
||
|
AllowOverride All
|
||
|
|
||
|
<IfModule mod_dav.c>
|
||
|
Dav off
|
||
|
</IfModule>
|
||
|
|
||
|
<IfModule mod_headers.c>
|
||
|
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
|
||
|
</IfModule>
|
||
|
|
||
|
SetEnv HOME /var/www/nextcloud
|
||
|
SetEnv HTTP_HOME /var/www/nextcloud
|
||
|
</Directory>
|
||
|
|
||
|
</VirtualHost>
|
||
| configs/phalanx/apache/nextcloud.conf | ||
|---|---|---|
|
Alias /nextcloud "/var/www/nextcloud/"
|
||
|
|
||
|
<Directory /var/www/nextcloud/>
|
||
|
Options +FollowSymlinks
|
||
|
AllowOverride All
|
||
|
|
||
|
<IfModule mod_dav.c>
|
||
|
Dav off
|
||
|
</IfModule>
|
||
|
|
||
|
SetEnv HOME /var/www/nextcloud
|
||
|
SetEnv HTTP_HOME /var/www/nextcloud
|
||
|
|
||
|
</Directory>
|
||
| configs/phalanx/apache/stuff.conf | ||
|---|---|---|
|
<Location /stuff>
|
||
|
AuthType Digest
|
||
|
AuthName "stuff"
|
||
|
AuthDigestProvider file
|
||
|
AuthUserFile /home/dsorber/web_users
|
||
|
Require valid-user
|
||
|
</Location>
|
||
| configs/phalanx/apache/trac.conf | ||
|---|---|---|
|
WSGIScriptAlias /trac /home/dsorber/trac/projects/headquarters/trac.wsgi
|
||
|
|
||
|
<Directory /home/dsorber/trac/projects/headquarters/>
|
||
|
WSGIApplicationGroup %{GLOBAL}
|
||
|
Require all granted
|
||
|
</Directory>
|
||
|
|
||
|
<Location "/trac/login">
|
||
|
AuthType Digest
|
||
|
AuthName "trac"
|
||
|
AuthDigestProvider file
|
||
|
AuthUserFile /home/dsorber/web_users
|
||
|
Require valid-user
|
||
|
</Location>
|
||
|
|
||
|
Alias /trac/chrome/common /home/dsorber/trac/projects/headquarters/htdocs/common
|
||
|
Alias /trac/chrome/site /home/dsorber/trac/projects/headquarters/htdocs/site
|
||
|
|
||
|
<Directory "/home/dsorber/trac/projects/headquarters/htdocs">
|
||
|
Require all granted
|
||
|
</Directory>
|
||
| configs/phalanx/apache/transmission.conf | ||
|---|---|---|
|
ProxyRequests Off
|
||
|
<Location /transmission>
|
||
|
AuthType Digest
|
||
|
AuthName "engine"
|
||
|
AuthDigestProvider file
|
||
|
AuthUserFile /home/dsorber/web_users
|
||
|
Require valid-user
|
||
|
ProxyPass http://192.168.8.6:9565/transmission
|
||
|
ProxyPassReverse http://192.168.8.6:9565/transmission
|
||
|
AuthType Digest
|
||
|
AuthName "engine"
|
||
|
AuthDigestProvider file
|
||
|
AuthUserFile /home/dsorber/web_users
|
||
|
Require valid-user
|
||
|
ProxyPass http://192.168.8.6:9565/transmission
|
||
|
ProxyPassReverse http://192.168.8.6:9565/transmission
|
||
|
</Location>
|
||
| configs/phalanx/network_tweaks_phalanx.sh | ||
|---|---|---|
|
#!/bin/bash
|
||
|
|
||
|
sleep 2
|
||
|
|
||
|
# Delete the default route for enp1s0f0, we only want to use it for 10G
|
||
|
# traffic. NOTE: netplan/networkd correctly is setting the route.
|
||
|
/sbin/route del -net 192.168.0.0 netmask 255.255.0.0 dev enp1s0f0
|
||
|
|
||
|
# Set 9000 MTU for the 10G interface enp1s0f0
|
||
|
/sbin/ifconfig enp1s0f0 mtu 9000
|
||
|
|
||
|
exit 0
|
||
| configs/phalanx/networking-tweaks.service | ||
|---|---|---|
|
[Unit]
|
||
|
Description=Tweak Some Networking Settings
|
||
|
Wants=network-online.target
|
||
|
After=network-online.target
|
||
|
|
||
|
[Service]
|
||
|
ExecStart=/home/dsorber/network_tweaks_phalanx.sh
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|
||
|
|
||
|
# Setup
|
||
|
#
|
||
|
# Install network_tweaks_phalanx.sh script.
|
||
|
# Copy networking-tweaks.service to /lib/systemd/system/
|
||
|
# Start it: sudo systemctl start networking-tweaks.service
|
||
|
# Enable it: sudo systemctl enable networking-tweaks.service
|
||
Long overdue update of phalanx configuration files.