Guest User

Untitled

a guest
Feb 22nd, 2022
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. ## Apache
  2.  
  3. <VirtualHost *:443>
  4. ServerName https://[domain]
  5. RewriteEngine On
  6. RewriteCond %{HTTP:Connection} Upgrade [NC]
  7. RewriteCond %{HTTP:Upgrade} websocket [NC]
  8. RewriteRule /(.*) ws://localhost:4455/$1 [P,L]
  9. AllowEncodedSlashes NoDecode
  10. ProxyPass / http://localhost:4455/ nocanon
  11. ProxyPassReverse / http://localhost:4455/
  12. Include /etc/letsencrypt/options-ssl-apache.conf
  13. ServerAlias [domain]
  14. SSLCertificateFile /etc/letsencrypt/live/[domain]/fullchain.pem
  15. SSLCertificateKeyFile /etc/letsencrypt/live/[domain]/privkey.pem
  16. </VirtualHost>
  17.  
  18.  
  19. ## Equivalent in Caddy
  20.  
  21. [domain] {
  22. reverse_proxy http://localhost:4455
  23. }
Advertisement
Add Comment
Please, Sign In to add comment