|
| 1 | +<VirtualHost *:80> |
| 2 | + # The ServerName directive sets the request scheme, hostname and port that |
| 3 | + # the server uses to identify itself. This is used when creating |
| 4 | + # redirection URLs. In the context of virtual hosts, the ServerName |
| 5 | + # specifies what hostname must appear in the request's Host: header to |
| 6 | + # match this virtual host. For the default virtual host (this file) this |
| 7 | + # value is not decisive as it is used as a last resort host regardless. |
| 8 | + # However, you must set it for any further virtual host explicitly. |
| 9 | + #ServerName www.example.com |
| 10 | + |
| 11 | + # ServerAdmin webmaster@localhost |
| 12 | + |
| 13 | + # will redirect from local and remote onto pve load balancer only accessible on the inside: |
| 14 | + ServerName pve.rather.puzzling.org |
| 15 | + ServerAlias pve |
| 16 | + |
| 17 | + RewriteEngine on |
| 18 | + RewriteCond %{SERVER_NAME} =pve.rather.puzzling.org [OR] |
| 19 | + RewriteCond %{SERVER_NAME} =pve |
| 20 | + RewriteRule ^ https://pve.rather.puzzling.org:8006%{REQUEST_URI} [END,NE,R=permanent] |
| 21 | +</VirtualHost> |
| 22 | + |
| 23 | +<VirtualHost *:443> |
| 24 | + # The ServerName directive sets the request scheme, hostname and port that |
| 25 | + # the server uses to identify itself. This is used when creating |
| 26 | + # redirection URLs. In the context of virtual hosts, the ServerName |
| 27 | + # specifies what hostname must appear in the request's Host: header to |
| 28 | + # match this virtual host. For the default virtual host (this file) this |
| 29 | + # value is not decisive as it is used as a last resort host regardless. |
| 30 | + # However, you must set it for any further virtual host explicitly. |
| 31 | + #ServerName www.example.com |
| 32 | + |
| 33 | + # ServerAdmin webmaster@localhost |
| 34 | + |
| 35 | + # will redirect from local and remote onto pve load balancer only accessible on the inside: |
| 36 | + ServerName pve.rather.puzzling.org |
| 37 | + |
| 38 | + RewriteEngine on |
| 39 | + RewriteCond %{SERVER_NAME} =pve.rather.puzzling.org [OR] |
| 40 | + RewriteCond %{SERVER_NAME} =pve |
| 41 | + RewriteRule ^ https://pve.rather.puzzling.org:8006%{REQUEST_URI} [END,NE,R=permanent] |
| 42 | + |
| 43 | + Include /etc/letsencrypt/options-ssl-apache.conf |
| 44 | + SSLCertificateFile /etc/letsencrypt/live/pve.rather.puzzling.org/fullchain.pem |
| 45 | + SSLCertificateKeyFile /etc/letsencrypt/live/pve.rather.puzzling.org/privkey.pem |
| 46 | +</VirtualHost> |
| 47 | + |
| 48 | +<VirtualHost *:8006> |
| 49 | + # ServerAdmin webmaster@localhost |
| 50 | + |
| 51 | + # will redirect from local and remote onto pve load balancer only accessible on the inside: |
| 52 | + ServerName pve.rather.puzzling.org |
| 53 | + |
| 54 | + <Location /*> |
| 55 | + |
| 56 | + Order allow,deny |
| 57 | + Allow from 192.168.0.0/16 |
| 58 | + |
| 59 | + </Location> |
| 60 | + |
| 61 | + <IfModule mod_proxy_balancer.c> |
| 62 | + |
| 63 | + ProxyPass "/" "balancer://pvecluster/" stickysession=JSESSIONID|jsessionid nofailover=On |
| 64 | + <Proxy "balancer://pvecluster"> |
| 65 | + BalancerMember "https://pve1:8006" |
| 66 | + BalancerMember "https://pve2:8006" loadfactor=2 |
| 67 | + BalancerMember "https://pve3:8006" loadfactor=5 |
| 68 | + </Proxy> |
| 69 | + |
| 70 | + </IfModule> |
| 71 | + |
| 72 | + <IfModule mod_proxy.c> |
| 73 | + |
| 74 | + ProxyPreserveHost On |
| 75 | + ProxyRequests Off |
| 76 | + ProxyErrorOverride On |
| 77 | + |
| 78 | + SSLProxyEngine On |
| 79 | + |
| 80 | + SetEnv force-proxy-request-1.0 1 |
| 81 | + SetEnv proxy-nokeepalive 1 |
| 82 | + |
| 83 | + SSLProxyVerify none |
| 84 | + SSLProxyCheckPeerCN off |
| 85 | + SSLProxyCheckPeerName off |
| 86 | + SSLProxyCheckPeerExpire off |
| 87 | + |
| 88 | + ProxyPass "/" "balancer://proxmox/" |
| 89 | + ProxyPassReverse "/" "balancer://proxmox/" |
| 90 | + |
| 91 | + </IfModule> |
| 92 | + |
| 93 | + Include /etc/letsencrypt/options-ssl-apache.conf |
| 94 | + SSLCertificateFile /etc/letsencrypt/live/pve.rather.puzzling.org/fullchain.pem |
| 95 | + SSLCertificateKeyFile /etc/letsencrypt/live/pve.rather.puzzling.org/privkey.pem |
| 96 | + |
| 97 | +#<Proxy "balancer://hotcluster"> |
| 98 | +# BalancerMember "http://www2.example.com:8080" loadfactor=1 |
| 99 | +# BalancerMember "http://www3.example.com:8080" loadfactor=2 |
| 100 | +# ProxySet lbmethod=bytraffic |
| 101 | + |
| 102 | +#</Proxy> |
| 103 | + |
| 104 | +#<Proxy "http://backend"> |
| 105 | +# ProxySet keepalive=On |
| 106 | +#</Proxy> |
| 107 | +#ProxySet "balancer://foo" lbmethod=bytraffic timeout=15 |
| 108 | +#ProxySet "ajp://backend:7001" timeout=15 |
| 109 | + |
| 110 | +# ProxyPreserveHost On |
| 111 | + |
| 112 | +# ProxyPass / http://127.0.0.1:8080/ |
| 113 | +# ProxyPassReverse / http://127.0.0.1:8080/ |
| 114 | + |
| 115 | + # SSL Protocol Adjustments: |
| 116 | + # The safe and default but still SSL/TLS standard compliant shutdown |
| 117 | + # approach is that mod_ssl sends the close notify alert but doesn't wait for |
| 118 | + # the close notify alert from client. When you need a different shutdown |
| 119 | + # approach you can use one of the following variables: |
| 120 | + # o ssl-unclean-shutdown: |
| 121 | + # This forces an unclean shutdown when the connection is closed, i.e. no |
| 122 | + # SSL close notify alert is send or allowed to received. This violates |
| 123 | + # the SSL/TLS standard but is needed for some brain-dead browsers. Use |
| 124 | + # this when you receive I/O errors because of the standard approach where |
| 125 | + # mod_ssl sends the close notify alert. |
| 126 | + # o ssl-accurate-shutdown: |
| 127 | + # This forces an accurate shutdown when the connection is closed, i.e. a |
| 128 | + # SSL close notify alert is send and mod_ssl waits for the close notify |
| 129 | + # alert of the client. This is 100% SSL/TLS standard compliant, but in |
| 130 | + # practice often causes hanging connections with brain-dead browsers. Use |
| 131 | + # this only for browsers where you know that their SSL implementation |
| 132 | + # works correctly. |
| 133 | + # Notice: Most problems of broken clients are also related to the HTTP |
| 134 | + # keep-alive facility, so you usually additionally want to disable |
| 135 | + # keep-alive for those clients, too. Use variable "nokeepalive" for this. |
| 136 | + # Similarly, one has to force some clients to use HTTP/1.0 to workaround |
| 137 | + # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and |
| 138 | + # "force-response-1.0" for this. |
| 139 | + # BrowserMatch "MSIE [2-6]" \ |
| 140 | + # nokeepalive ssl-unclean-shutdown \ |
| 141 | + # downgrade-1.0 force-response-1.0 |
| 142 | + |
| 143 | + #automatically inserted by `certbot --apache`: (also, generate www.$domain alias with: certbot certonly --expand -d rather.puzzling.org,www.rather.puzzling.org |
| 144 | +# Include /etc/letsencrypt/options-ssl-apache.conf |
| 145 | +# SSLCertificateFile /etc/letsencrypt/live/pve.rather.puzzling.org/fullchain.pem |
| 146 | +# SSLCertificateKeyFile /etc/letsencrypt/live/pve.rather.puzzling.org/privkey.pem |
| 147 | +</VirtualHost> |
| 148 | + |
| 149 | +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
0 commit comments