0

I am currently setting up a little home lab and I am trying to figure out how to kind of pin some local subdomains to a specific port. Example: I have Adguard running on port 80 (domain.home) and Homer running on port 85 that I would like to access through dashboard.domain.home. Do I need some kind of a dns rewrite in adguard? right now I have a dns rewrite dashboard.domain.home pointing to domain.home (don't know if it makes any sense, maybe I didn't understand the adguard docs correctly) and everytime I access dashboard.domain.home I end up on the Adguard login page (which is kind of correct because of the rewrite I guess). My apache config for homer looks like this:

<VirtualHost *:80>
    ServerName dashboard.domain.home
    ProxyPreserveHost On
    <Proxy *>
        Order allow,deny
        Allow from all
    </Proxy>
    ProxyPass / http://192.168.178.138:85/
    ProxyPassReverse / http://192.168.178.138:85/
ServerAdmin webmaster@localhost
DocumentRoot /var/www/homer

</VirtualHost>

I am kinda new to apache, never really had to use that. I would appreciate any help

Pakuss
  • 1
  • DNS only maps host names to IP-addresses (more or less - see: https://serverfault.com/q/74362/37681) - In that regard your approach is text book correct, a name based virtualhost on port 80, the default port for plain http and then a proxy_pass to the correct non-standard port so people can use http://sub.example.com without explicitly using a non-standard port and having to use an URL with a custom port like http://sub.example.com:85 – HBruijn Oct 13 '23 at 11:46
  • Trying that I always end up (when accessing dashboard.domain.home) at the start page of my adguard (which is under domain.home running on default http:80) – Pakuss Oct 13 '23 at 11:50
  • 1
    Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow. – Romeo Ninov Oct 13 '23 at 12:53

0 Answers0