Skip to content

Reverse proxy to virtual machines? #16178

Answered by Verhoeckx
Verhoeckx asked this question in Q&A
Discussion options

You must be logged in to vote

For everybody who has the same problem, this is how I did it.

  1. Install the Apache web server.
    sudo dnf install httpd

  2. Enable the Apache web server in systemd.
    sudo systemctl enable httpd

  3. Start the Apache web server.
    sudo systemctl start httpd

  4. Open port 80 and 443 in the firewall.

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
  1. Create a new virtual hosts file.
    sudo vim /etc/httpd/conf.d/virtualhosts.conf

  2. Add the following code.

ServerName localhost
DocumentRoot /var/www/html/

<VirtualHost *:80 >
    ServerName [your.domain.com]
    ProxyPreserveHost On
    ProxyPass / h…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Verhoeckx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant