- create file /etc/apache2/sites-available/VIRTUALHOST_NAME.conf
sudo a2ensite virtual_host_file_name
- to disable an existing conf file
sudo a2dissite virtual_host_file_name
- copy file in /etc/apache2/sites-enabled/VIRTUALHOST_NAME.conf
- install ssl module
sudo a2enmod ssl
- install proxy module
sudo a2enmod proxy
- install rewrite module
sudo a2enmod rewrite
- install proxy_connect module
sudo a2enmod proxy_connect
- install proxy_http module
sudo a2enmod proxy_http
sudo service apache2 reload
Other commands for apache:
- show all modules installed
apache2ctl -M
- show logs
sudo systemctl status apache2.service
References
- DESIRED_PORT: represent the port where your current local server is running (node/go/etc server)
- URL_ADDRESS: your DNS