Advertisement
benshepherd

ProxyPass virtual host

Sep 26th, 2019
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerName api.yourdomain.com
  3. ProxyPass / http://www.example.com:8001/
  4. ProxyPassReverse / http://www.example.com:8001/
  5. </VirtualHost>
  6.  
  7. <VirtualHost *:443>
  8. ServerAdmin [email protected]
  9.  
  10. ServerName api.domain.com
  11. ProxyPass / http://localhost:8080/
  12. ProxyPassReverse / http://localhost:8080/
  13.  
  14. ErrorLog ${APACHE_LOG_DIR}/error.log
  15. CustomLog ${APACHE_LOG_DIR}/access.log combined
  16.  
  17. SSLEngine on
  18. SSLCertificateFile /etc/letsencrypt/live/api.domain.com/fullchain.pem
  19. SSLCertificateKeyFile /etc/letsencrypt/live/api.domain.com/privkey.pem
  20. SSLCertificateChainFile /etc/letsencrypt/live/api.domain.com/fullchain.pem
  21. Include /etc/letsencrypt/options-ssl-apache.conf
  22. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement