This repository was archived by the owner on Dec 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathssl-carcano-gate.conf
46 lines (37 loc) · 1.55 KB
/
ssl-carcano-gate.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# A Fully-SSL Connection
<VirtualHost *:443>
Protocols h2 http/1.1
ServerName gate.lolization.space
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/gate.lolization.space/fullchain.pem # Change this directory into your own cert dir
SSLCertificateKeyFile /etc/letsencrypt/live/gate.lolization.space/privkey.pem # Change this directory into your own cert dir
Header always set X-Content-Type-Options "nosniff"
Header always set X-Xss-Protection "1; mode=block"
RequestHeader set X-Forwarded-Proto "https"
<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css)$"> # We create some static file cache
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 14 days"
Header set Cache-Control "public"
</IfModule>
</FilesMatch>
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# A Custom Error when websocket are down!
ProxyPass /error-documents !
ErrorDocument 503 /error-documents/503.html
Alias /error-documents /home/root/websocket/public
# Websocket passthrough
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:4567/$1 [P,L]
ProxyPass / http://ns01-sg.lolization.space:7500/ retry=1
ProxyPassReverse / http://ns01-sg.lolization.space:7500/
# Log stuff
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>