278 lines
8.0 KiB
ApacheConf
278 lines
8.0 KiB
ApacheConf
#ServerRoot "/etc/apache2"
|
|
|
|
LockFile ${APACHE_LOCK_DIR}/accept.lock
|
|
PidFile ${APACHE_PID_FILE}
|
|
Timeout 300
|
|
KeepAlive On
|
|
MaxKeepAliveRequests 100
|
|
KeepAliveTimeout 5
|
|
|
|
<IfModule mpm_prefork_module>
|
|
StartServers 5
|
|
MinSpareServers 5
|
|
MaxSpareServers 10
|
|
MaxClients 150
|
|
MaxRequestsPerChild 0
|
|
</IfModule>
|
|
|
|
<IfModule mpm_worker_module>
|
|
StartServers 2
|
|
MinSpareThreads 25
|
|
MaxSpareThreads 75
|
|
ThreadLimit 64
|
|
ThreadsPerChild 25
|
|
MaxClients 150
|
|
MaxRequestsPerChild 0
|
|
</IfModule>
|
|
|
|
<IfModule mpm_event_module>
|
|
StartServers 2
|
|
MinSpareThreads 25
|
|
MaxSpareThreads 75
|
|
ThreadLimit 64
|
|
ThreadsPerChild 25
|
|
MaxClients 150
|
|
MaxRequestsPerChild 0
|
|
</IfModule>
|
|
|
|
# These need to be set in /etc/apache2/envvars
|
|
User ${APACHE_RUN_USER}
|
|
Group ${APACHE_RUN_GROUP}
|
|
|
|
AccessFileName .htaccess
|
|
|
|
<Files ~ "^\.ht">
|
|
Order allow,deny
|
|
Deny from all
|
|
Satisfy all
|
|
</Files>
|
|
|
|
DefaultType None
|
|
|
|
|
|
|
|
HostnameLookups Off
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
|
|
LogLevel warn
|
|
|
|
# Include module configuration:
|
|
Include mods-enabled/*.load
|
|
Include mods-enabled/*.conf
|
|
|
|
ServerName rudolf.com.ua
|
|
|
|
<FilesMatch "\.(cgi|shtml|phtml|php)$">
|
|
SSLOptions +StdEnvVars
|
|
</FilesMatch>
|
|
|
|
<Directory /usr/lib/cgi-bin>
|
|
SSLOptions +StdEnvVars
|
|
</Directory>
|
|
|
|
BrowserMatch "MSIE [2-6]" \
|
|
nokeepalive ssl-unclean-shutdown \
|
|
downgrade-1.0 force-response-1.0
|
|
|
|
# MSIE 7 and newer should be able to use keepalive
|
|
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
|
|
|
|
# Include ports listing
|
|
Include ports.conf
|
|
|
|
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
|
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
|
LogFormat "%h %l %u %t \"%r\" %>s %O" common
|
|
LogFormat "%{Referer}i -> %U" referer
|
|
LogFormat "%{User-agent}i" agent
|
|
|
|
|
|
Include conf.d/
|
|
|
|
Include macro.conf
|
|
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost *:443>
|
|
ServerAdmin rudolfss13@gmail.com
|
|
ServerName *.rudolf.com.ua
|
|
|
|
Redirect 404 /
|
|
ErrorDocument 404 "Page Not Found"
|
|
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile /etc/letsencrypt/live/rudolf.com.ua/cert.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/rudolf.com.ua/privkey.pem
|
|
SSLCertificateChainFile /etc/letsencrypt/live/rudolf.com.ua/chain.pem
|
|
</VirtualHost>
|
|
</IfModule>
|
|
<VirtualHost *:80>
|
|
ServerAdmin rudolfss13@gmail.com
|
|
ServerName *.rudolf.com.ua
|
|
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} off
|
|
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
|
|
|
</VirtualHost>
|
|
|
|
|
|
## Virtual hosts
|
|
Use DocRootVHost "rudolf" "/home/www/root"
|
|
Use DocRootVHost "static.rudolf" "/home/www/static"
|
|
Use ProxySSLVHost "torrent.rudolf" "/transmission" "http://localhost:9091/transmission" "torrent.rudolf"
|
|
Use ProxySSLVHost "syncthing.rudolf" "/" "http://localhost:8384/" "syncthing.rudolf"
|
|
Use ProxySSLVHost "jenkins.rudolf" "/" "http://localhost:8081/" "jenkins.rudolf"
|
|
# TODO Header edit Location ^http://jenkins.rudolf.com.ua https://jenkins.rudolf.com.ua
|
|
Use ProxySSLVHost "webmin.rudolf" "/" "http://localhost:10000/" "webmin.rudolf"
|
|
Use ProxySSLVHost "bitsync.rudolf" "/" "http://localhost:8888/" "bitsync.rudolf"
|
|
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost *:443>
|
|
ServerAdmin rudolfss13@gmail.com
|
|
ServerName wa.rudolf.com.ua
|
|
|
|
ProxyPass / https://web.whatsapp.com/
|
|
ProxyPassReverse / https://web.whatsapp.com/
|
|
|
|
# ProxyPass wss://w1.wa.rudolf.com.ua/ws wss://w1.web.whatsapp.com/ws
|
|
# #ProxyPassReverse wss://w1.wa.rudolf.com.ua/ws wss://w1.web.whatsapp.com/ws
|
|
# ProxyPass wss://w2.wa.rudolf.com.ua/ws wss://w2.web.whatsapp.com/ws
|
|
# #ProxyPassReverse wss://w2.wa.rudolf.com.ua/ws wss://w2.web.whatsapp.com/ws
|
|
# ProxyPass wss://w3.wa.rudolf.com.ua/ws wss://w3.web.whatsapp.com/ws
|
|
# #ProxyPassReverse wss://w3.wa.rudolf.com.ua/ws wss://w3.web.whatsapp.com/ws
|
|
# ProxyPass wss://w4.wa.rudolf.com.ua/ws wss://w4.web.whatsapp.com/ws
|
|
# #ProxyPassReverse wss://w4.wa.rudolf.com.ua/ws wss://w4.web.whatsapp.com/ws
|
|
# ProxyPass wss://w5.wa.rudolf.com.ua/ws wss://w5.web.whatsapp.com/ws
|
|
# #ProxyPassReverse wss://w5.wa.rudolf.com.ua/ws wss://w5.web.whatsapp.com/ws
|
|
# ProxyPass wss://w6.wa.rudolf.com.ua/ws wss://w6.web.whatsapp.com/ws
|
|
# #ProxyPassReverse wss://w6.wa.rudolf.com.ua/ws wss://w6.web.whatsapp.com/ws
|
|
# ProxyPass wss://w7.wa.rudolf.com.ua/ws wss://w7.web.whatsapp.com/ws
|
|
# #ProxyPassReverse wss://w7.wa.rudolf.com.ua/ws wss://w7.web.whatsapp.com/ws
|
|
# ProxyPass wss://w8.wa.rudolf.com.ua/ws wss://w8.web.whatsapp.com/ws
|
|
# #ProxyPassReverse wss://w8.wa.rudolf.com.ua/ws wss://w8.web.whatsapp.com/ws
|
|
|
|
SSLProxyEngine on
|
|
|
|
SetOutputFilter INFLATE;SUBSTITUTE
|
|
|
|
Substitute "s|web.whatsapp.com|wa.rudolf.com.ua|ni"
|
|
|
|
Header edit* Content-Security-Policy web.whatsapp.com wa.rudolf.com.ua
|
|
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile /etc/letsencrypt/live/wa.rudolf.com.ua/cert.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/wa.rudolf.com.ua/privkey.pem
|
|
SSLCertificateChainFile /etc/letsencrypt/live/wa.rudolf.com.ua/chain.pem
|
|
|
|
|
|
</VirtualHost>
|
|
</IfModule>
|
|
|
|
# TODO smarthome.rudolf.com.ua
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost *:443>
|
|
|
|
ServerAdmin rudolfss13@gmail.com
|
|
ServerName smarthome.rudolf.com.ua
|
|
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile /etc/letsencrypt/live/smarthome.rudolf.com.ua/cert.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/smarthome.rudolf.com.ua/privkey.pem
|
|
SSLCertificateChainFile /etc/letsencrypt/live/smarthome.rudolf.com.ua/chain.pem
|
|
|
|
Use GoogleAuth https://smarthome.rudolf.com.ua/oauth2callback /
|
|
|
|
<Location />
|
|
Require claim email:rudolfss13@gmail.com
|
|
Require claim email:malta4ka@gmail.com
|
|
</Location>
|
|
|
|
# ProxyPass / http://192.168.17.2:8080/smarthome/
|
|
# ProxyPassReverse / http://192.168.17.2:8080/smarthome/
|
|
|
|
ProxyPass / http://192.168.17.3:8080/smarthome/
|
|
ProxyPassReverse / http://192.168.17.3:8080/smarthome/
|
|
|
|
</VirtualHost>
|
|
</IfModule>
|
|
<VirtualHost *:80>
|
|
|
|
ServerAdmin rudolfss13@gmail.com
|
|
ServerName smarthome.rudolf.com.ua
|
|
|
|
<Location />
|
|
Order deny,allow
|
|
Deny from all
|
|
Allow from 192.168.17.
|
|
Allow from 5.19.137.112
|
|
</Location>
|
|
|
|
|
|
SSLEngine off
|
|
|
|
# ProxyPass / http://192.168.17.2:8080/smarthome/
|
|
# ProxyPassReverse / http://192.168.17.2:8080/smarthome/
|
|
|
|
ProxyPass / http://192.168.17.3:8080/smarthome/
|
|
ProxyPassReverse / http://192.168.17.3:8080/smarthome/
|
|
</VirtualHost>
|
|
|
|
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost *:444>
|
|
|
|
ServerAdmin rudolfss13@gmail.com
|
|
ServerName smarthome.rudolf.com.ua
|
|
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile /etc/letsencrypt/live/smarthome.rudolf.com.ua/cert.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/smarthome.rudolf.com.ua/privkey.pem
|
|
SSLCertificateChainFile /etc/letsencrypt/live/smarthome.rudolf.com.ua/chain.pem
|
|
|
|
|
|
<Location ~ ".*manifest.json">
|
|
AuthType None
|
|
Require all granted
|
|
</Location>
|
|
|
|
|
|
Use GoogleAuth https://smarthome.rudolf.com.ua:444/oauth2callback /
|
|
|
|
|
|
# <Location />
|
|
# Require claim email:rudolfss13@gmail.com
|
|
# Require claim email:malta4ka@gmail.com
|
|
# </Location>
|
|
|
|
|
|
ProxyPass / http://192.168.17.106:9999/
|
|
ProxyPassReverse / http://192.168.17.106:9999/
|
|
|
|
</VirtualHost>
|
|
</IfModule>
|
|
|
|
|
|
# ./letsencrypt-auto renew --standalone
|
|
# ./letsencrypt-auto certonly --standalone -d rudolf.com.ua
|
|
|
|
|
|
# rudolf.com.ua
|
|
# jenkins.rudolf.com.ua
|
|
# torrent.rudolf.com.ua
|
|
# syncthing.rudolf.com.ua
|
|
# dev.rudolf.com.ua
|
|
# ejudge.rudolf.com.ua
|
|
# webmin.rudolf.com.ua
|
|
# smarthome.rudolf.com.ua
|
|
# bitsync.rudolf.com.ua
|
|
# wa.rudolf.com.ua
|
|
# static.rudolf.com.ua
|
|
|
|
|
|
#Include sites-enabled/
|