Guest User

server2

a guest
Mar 9th, 2023
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerAdmin webmaster@localhost
  3. ServerName sub.example.com
  4.  
  5. <Proxy *>
  6. Require all granted
  7. </Proxy>
  8.  
  9. ProxyPass "/" "http://10.0.0.30/"
  10. ProxyPassReverse "/" "http://10.0.0.30/"
  11.  
  12. RewriteEngine on
  13. RewriteCond %{SERVER_NAME} =sub.example.com
  14. RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  15. </VirtualHost>
  16. <IfModule mod_ssl.c>
  17. <VirtualHost *:443>
  18. ServerAdmin webmaster@localhost
  19. ServerName sub.example.com
  20. SSLEngine on
  21.  
  22. <Proxy *>
  23. Require all granted
  24. </Proxy>
  25.  
  26. ProxyPass "/" "http://10.0.0.30/"
  27. ProxyPassReverse "/" "http://10.0.0.30/"
  28.  
  29. Include /etc/letsencrypt/options-ssl-apache.conf
  30. SSLCertificateFile /etc/letsencrypt/live/sub.example.com/fullchain.pem
  31. SSLCertificateKeyFile /etc/letsencrypt/live/sub.example.com/privkey.pem
  32. </VirtualHost>
  33. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment