Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. curl -k -v https://example.com/images/example.jpg
  2.  
  3. <IfModule mod_ssl.c>
  4. <VirtualHost *:443>
  5. Protocols h2 http/1.1
  6. ServerName example.com
  7. DocumentRoot /home/ubuntu/public_html
  8.  
  9. ErrorLog ${APACHE_LOG_DIR}/error.log
  10. CustomLog ${APACHE_LOG_DIR}/access.log combined
  11.  
  12. # socket.io 1.0+ starts all connections with an HTTP polling request
  13. RewriteCond %{QUERY_STRING} transport=polling [NC]
  14. RewriteRule /(.*) http://localhost:8004/$1 [P]
  15.  
  16. # When socket.io wants to initiate a WebSocket connection, it sends an
  17. # "upgrade: websocket" request that should be transferred to ws://
  18. RewriteCond %{HTTP:Upgrade} websocket [NC]
  19. RewriteRule /(.*) ws://localhost:8004/$1 [P]
  20.  
  21. # Proxy API
  22. ProxyRequests Off
  23. ProxyPreserveHost On
  24. ProxyVia Full
  25. ProxyPass /api http://localhost:8004
  26. ProxyPassReverse /api http://localhost:8004
  27.  
  28. <Directory "/home/ubuntu/public_html" >
  29. # Don't rewrite files or directories
  30. RewriteCond %{REQUEST_FILENAME} -f [OR]
  31. RewriteCond %{REQUEST_FILENAME} -d
  32. RewriteRule ^ - [L]
  33.  
  34. # Rewrite everything else to index.html to allow html5 state links
  35. RewriteRule ^ index.html [L]
  36. </Directory>
  37.  
  38. # Certs
  39. SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
  40. SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
  41. Include /etc/letsencrypt/options-ssl-apache.conf
  42. </VirtualHost>
  43. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement