-
Notifications
You must be signed in to change notification settings - Fork 0
/
apache.conf
29 lines (21 loc) · 866 Bytes
/
apache.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
#This config file is for apache 2.4
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /path/to/pr0clone/public
ServerName pr0gramm.your-domain.com
ErrorLog ${APACHE_LOG_DIR}/pr0gramm_error.log
CustomLog ${APACHE_LOG_DIR}/pr0gramm_access.log combined
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/api/
RewriteCond %{REQUEST_URI} !^/data/
RewriteRule ^/(.*)$ /index.html [P,L]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/data/
RewriteRule ^/data/(\w+)/(.*)$ http://$1.pr0gramm.com/$2 [R=302,L]
#RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ http://localhost:3000%{REQUEST_URI} [P,QSA,L]
<Location "/">
Require all granted
</Location>
</VirtualHost>