mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Updated Apache (markdown)
parent
fab84fa831
commit
5f8978a8bb
1 changed files with 37 additions and 34 deletions
71
Apache.md
71
Apache.md
|
|
@ -1,46 +1,49 @@
|
||||||
* Enable Mod_Proxy: `sudo a2enmod proxy proxy_http proxy_wstunnel` then restart Apache `service apache2 restart`
|
## 1) Enable Mod_Proxy
|
||||||
* Configure your virtual host (vhost)
|
|
||||||
|
|
||||||
Let say you have the following "mytodo.org" vhost configured in `/etc/apache2/sites-available/mytodo.org.conf`:
|
`sudo a2enmod proxy proxy_http proxy_wstunnel`
|
||||||
|
|
||||||
|
[Apache Mod_Proxy documentation](http://httpd.apache.org/docs/current/mod/mod_proxy.html)
|
||||||
|
|
||||||
|
## 2) Restart Apache
|
||||||
|
|
||||||
|
`service apache2 restart`
|
||||||
|
|
||||||
|
## 3) Enable SSL in Apache config
|
||||||
|
```
|
||||||
|
Listen 443
|
||||||
|
|
||||||
|
NameVirtualHost *:443
|
||||||
|
```
|
||||||
|
## 4) Set Apache proxy
|
||||||
|
|
||||||
|
Config at `/etc/apache2/sites-available/example.com.conf`:
|
||||||
|
|
||||||
```ApacheConf
|
```ApacheConf
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:443>
|
||||||
ServerName mytodo.org
|
SSLEngine On
|
||||||
ServerAdmin webmaster@mytodo.org
|
|
||||||
|
|
||||||
DocumentRoot /var/www-vhosts/mytodo.org
|
# Set the path to SSL certificate
|
||||||
<Directory />
|
# Usage: SSLCertificateFile /path/to/cert.pem
|
||||||
Options FollowSymLinks
|
SSLCertificateFile /etc/apache2/ssl/file.pem
|
||||||
AllowOverride AuthConfig FileInfo Indexes Options=MultiViews
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Directory /var/www-vhosts/mytodo.org>
|
ProxyPassMatch "^/(sockjs\/.*\/websocket)$" "ws://127.0.0.1:3001/$1"
|
||||||
Options -Indexes +FollowSymLinks +MultiViews
|
ProxyPass "/" "http://127.0.0.1:3001/"
|
||||||
AllowOverride AuthConfig FileInfo Indexes Options=MultiViews
|
ProxyPassReverse "/" "http://127.0.0.1:3001/"
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
ErrorLog /var/log/apache2/mytodo.org-error.log
|
|
||||||
|
|
||||||
# Possible values include: debug, info, notice, warn, error, crit,
|
|
||||||
# alert, emerg.
|
|
||||||
LogLevel warn
|
|
||||||
|
|
||||||
CustomLog /var/log/apache2/mytodo.org-access.log combined
|
|
||||||
ServerSignature Off
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
|
||||||
Add the following lines at the end just before `</VirtualHost>`:
|
## 5) Enable your site
|
||||||
|
|
||||||
```ApacheConf
|
`sudo a2ensite example.com`
|
||||||
ProxyPassMatch "^/(sockjs\/.*\/websocket)$" "ws://127.0.0.1:8081/$1"
|
|
||||||
ProxyPass "/" "http://127.0.0.1:8081/"
|
## 6) Reload Apache
|
||||||
ProxyPassReverse "/" "http://127.0.0.1:8081/"
|
|
||||||
|
`sudo service apache2 reload`
|
||||||
|
|
||||||
|
## 7) Snap settings
|
||||||
```
|
```
|
||||||
|
sudo snap set wekan root-url='https://example.com'
|
||||||
|
|
||||||
**Note:** if not already done, don't forget to enable your vhost `sudo a2ensite mytodo.org`
|
sudo snap set wekan port='3001'
|
||||||
|
```
|
||||||
Reload Apache `sudo service apache2 reload`
|
|
||||||
|
|
||||||
[Apache Mod_Proxy documentation](http://httpd.apache.org/docs/current/mod/mod_proxy.html)
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue