|
|
First install apache2
|
|
|
|
|
|
```
|
|
|
sudo apt-get update
|
|
|
sudo apt-get install apache2
|
|
|
```
|
|
|
|
|
|
It is important, that apache2 is not listening to the same Port as PrivMX server is listening to (defined in `/etc/privmx-team-server/config.json`)
|
|
|
The standard port for apache2 is 80. Make sure to load the apache modules `proxy`, `proxy_http` and `proxy_balance`.
|
|
|
|
|
|
```
|
|
|
sudo a2enmod proxy
|
|
|
sudo a2enmod proxy_http
|
|
|
sudo a2enmod proxy_balance
|
|
|
```
|
|
|
|
|
|
Create a Virtual Host. Therefor copy the `000-default.conf` file.
|
|
|
|
|
|
```
|
|
|
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/yourdomain.org.conf
|
|
|
```
|
|
|
|
|
|
Open the new created `yourdomain.org.conf` file with root privileges to edit it.
|
|
|
|
|
|
```
|
|
|
sudo vim /etc/apache2/sites-available/yourdomain.org.conf
|
|
|
```
|
|
|
|
|
|
Forward requests from your domain to your IP and the port which you defined in the privMX configuration file.
|
|
|
|
|
|
```
|
|
|
<VirtualHost yourdomain.org:*>
|
|
|
ProxyPass "/" "http://yourIP:port/"
|
|
|
</VirtualHost>
|
|
|
```
|
|
|
|
|
|
Last step is to enable the new site and disable the default site:
|
|
|
|
|
|
```
|
|
|
sudo a2ensite yourdomain.org.conf
|
|
|
sudo a2dissite 000-default.conf
|
|
|
```
|
|
|
|
|
|
When everything is done restart apache to activate these changes. Also, check if the restart was successful.
|
|
|
|
|
|
```
|
|
|
sudo systemctl restart apache2
|
|
|
sudo systemctl status apache2
|
|
|
``` |
|
|
\ No newline at end of file |