Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -k -v https://example.com/images/example.jpg
- <IfModule mod_ssl.c>
- <VirtualHost *:443>
- Protocols h2 http/1.1
- ServerName example.com
- DocumentRoot /home/ubuntu/public_html
- ErrorLog ${APACHE_LOG_DIR}/error.log
- CustomLog ${APACHE_LOG_DIR}/access.log combined
- # socket.io 1.0+ starts all connections with an HTTP polling request
- RewriteCond %{QUERY_STRING} transport=polling [NC]
- RewriteRule /(.*) http://localhost:8004/$1 [P]
- # When socket.io wants to initiate a WebSocket connection, it sends an
- # "upgrade: websocket" request that should be transferred to ws://
- RewriteCond %{HTTP:Upgrade} websocket [NC]
- RewriteRule /(.*) ws://localhost:8004/$1 [P]
- # Proxy API
- ProxyRequests Off
- ProxyPreserveHost On
- ProxyVia Full
- ProxyPass /api http://localhost:8004
- ProxyPassReverse /api http://localhost:8004
- <Directory "/home/ubuntu/public_html" >
- # Don't rewrite files or directories
- RewriteCond %{REQUEST_FILENAME} -f [OR]
- RewriteCond %{REQUEST_FILENAME} -d
- RewriteRule ^ - [L]
- # Rewrite everything else to index.html to allow html5 state links
- RewriteRule ^ index.html [L]
- </Directory>
- # Certs
- SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
- SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
- Include /etc/letsencrypt/options-ssl-apache.conf
- </VirtualHost>
- </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement