Custom VirtualHost Hijacks domain and subdomains

I have just moved from Arch Linux to NethServer. I am having a strange issue that I can’t figure out on my own reguarding a virtualhost file.

I have my blade server setup with my domain and several subdomains. Everything is working as it should. I installed Emby Media Server manually, and have been trying to get it set up on the subdomain

When I use the same virtualhost config as I was in Arch, works, but it also breaks the Nextcloud and SOGo pages, and I can access emby even on my unused subdomains that I haven’t added to any virtualhost file yet. My desired behavior is that I only want it to be accessible via

Here is my exact virtualhost file:

<VirtualHost *:80>

    RewriteEngine on
    RewriteCond %{SERVER_NAME}
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]

<VirtualHost *:443>

<proxy *>
    AddDefaultCharset off
    Order Allow,Deny
    Allow from all

    ProxyRequests     Off
    ProxyPreserveHost On

    ProxyPass "/embywebsocket" "ws://"
    ProxyPassReverse "/embywebsocket" "ws://"

    ProxyPass "/" ""
    ProxyPassReverse "/" ""

    SSLEngine on
    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

NethServer Version: 7.4.1708
Module: nethserver-httpd

Sounds like a wildcard record in DNS, not a Vhost issue.

Hello @Christopher_Suttles,

NethServer has its own Virtual Hosts and Reverse Proxy modules:

I am afraid your virtualhost file in a way conflicts with already existing ones at /etc/httpd/conf.d

I don’t really know emby… What’s the advantage to other media tools? Do you know ampache or madsonic?

1 Like