-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache.conf
74 lines (57 loc) · 2.32 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<VirtualHost *:80>
ServerName api.fryntiz.es
ServerAlias www.api.fryntiz.es
Redirect permanent / https://api.fryntiz.es/
ServerAdmin [email protected]
DocumentRoot /var/www/public/api-fryntiz/public
<Directory /var/www/public/api-fryntiz/public>
Options +FollowSymLinks
IndexIgnore */*
AllowOverride All
RewriteEngine on
## Si el directorio o el archivo existe, entonces se usa directamente:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
## Otherwise forward it to index.php
RewriteRule . index.php
</Directory>
## Proxy
ProxyPass "/app/" "ws://127.0.0.1:6001/app/"
ProxyPassReverse "/app/" "ws://127.0.0.1:6001/app/"
ProxyPass "/apps/" "http://127.0.0.1:6001/apps/"
ProxyPassReverse "/apps/" "http://127.0.0.1:6001/apps/"
## Logs
ErrorLog ${APACHE_LOG_DIR}/api.fryntiz.es_error.log
CustomLog ${APACHE_LOG_DIR}/api.fryntiz.es_access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName api.fryntiz.es
ServerAlias www.api.fryntiz.es
Redirect permanent / https://api.fryntiz.es/
ServerAdmin [email protected]
DocumentRoot /var/www/public/api-fryntiz/public
<Directory /var/www/public/api-fryntiz/public>
Options +FollowSymLinks
IndexIgnore */*
AllowOverride All
RewriteEngine on
## Si el directorio o el archivo existe, entonces se usa directamente:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
## Otherwise forward it to index.php
RewriteRule . index.php
</Directory>
## Proxy
ProxyPass "/app/" "ws://127.0.0.1:6001/app/"
ProxyPassReverse "/app/" "ws://127.0.0.1:6001/app/"
ProxyPass "/apps/" "https://127.0.0.1:6001/apps/"
ProxyPassReverse "/apps/" "https://127.0.0.1:6001/apps/"
## Logs
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/api.fryntiz.dev/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/api.fryntiz.dev/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/api.fryntiz.dev/chain.pem
ErrorLog ${APACHE_LOG_DIR}/api.fryntiz.es_error-ssl.log
CustomLog ${APACHE_LOG_DIR}/api.fryntiz.es_access-ssl.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet