Setting up Vhosts with apanche2 on ubuntu 20.04

Steps taken a) get a droplet with plesk from digital ocean b) create a conf file in /etc/apache2/sites-available/ c)add the custom ports on /etc/apache2/ports.conf d)Enable the conf file with apache a2ensite e) restart apache2

We have been trying to set up virtual hosts on apache2 for my ubuntu digital ocean droplet so that it can pick up ssl on ports.What we mean is we would like different users to access my application on ports for example one client would be on another would be on . We are utilizing proxy pass and reverse proxy.We are using this config for our vitual host with conf file

<IfModule mod_ssl.c> <VirtualHost *:2095> ServerName ServerAlias * DocumentRoot /var/www/html SSLProxyEngine on SSLEngine On SSLCertificateFile /etc/ssl/certs/ SSLCertificateKeyFile /etc/ssl/private/

<Proxy *>
    Allow from all

ProxyPass / http://serverIP:1095/
ProxyPassReverse / http:/serverIP:1095/
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto: "https"

/////////////////////////////////////////////////////// we then add the ports to the ports.conf file and enable the site using apache a2ensite however when we try access the domain we get an error but if we go to the domain is present and fully secured so we do not get what we are doing wrong Lastly we also have a plesk panel on this droplet

we have checked my apache2 logs and everything seems fine kindly help

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer