Bug 64675 - missing ServerAlias in httpd -t -D DUMP_VHOSTS output
Summary: missing ServerAlias in httpd -t -D DUMP_VHOSTS output
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4-HEAD
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2020-08-18 11:50 UTC by Henadzi Siardziukou
Modified: 2020-08-18 13:01 UTC (History)
0 users



Attachments
patch for bug 64675 (2.55 KB, patch)
2020-08-18 12:57 UTC, Henadzi Siardziukou
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henadzi Siardziukou 2020-08-18 11:50:45 UTC
httpd -t -D DUMP_VHOSTS doesn't print ServerAlias if there's only one VirtualHost declared for specific address and port.

<VirtualHost *:80>
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ServerAlias *.dummy-host.example.com
</VirtualHost>

<VirtualHost *:80>
    ServerName dummy-host2.example.com
</VirtualHost>

<VirtualHost *:8080>
    ServerName 8080-dummy-host.example.com
    ServerAlias www.8080-dummy-host.example.com
    ServerAlias *.8080-dummy-host.example.com
</VirtualHost>

For this configuration httpd -t -D DUMP_VHOSTS prints this:

VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server dummy-host.example.com (/home/user/bin/conf/extra/httpd-vhosts.conf:1)
         port 80 namevhost dummy-host.example.com (/home/user/bin/conf/extra/httpd-vhosts.conf:1)
                 alias www.dummy-host.example.com
                 wild alias *.dummy-host.example.com
         port 80 namevhost dummy-host2.example.com (/home/user/bin/conf/extra/httpd-vhosts.conf:7)
*:8080                 8080-dummy-host.example.com (/home/user/bin/conf/extra/httpd-vhosts.conf:11)


There's no output for ServerAlias records for VirtualHost *:8080.
Comment 1 Henadzi Siardziukou 2020-08-18 12:57:40 UTC
Created attachment 37396 [details]
patch for bug 64675
Comment 2 Henadzi Siardziukou 2020-08-18 13:01:30 UTC
With patch applied httpd -t -D DUMP_VHOSTS prints this:

VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server dummy-host.example.com (/home/user/bin/conf/extra/httpd-vhosts.conf:1)
         port 80 namevhost dummy-host.example.com (/home/user/bin/conf/extra/httpd-vhosts.conf:1)
                 alias www.dummy-host.example.com
                 wild alias *.dummy-host.example.com
         port 80 namevhost dummy-host2.example.com (/home/user/bin/conf/extra/httpd-vhosts.conf:7)
*:8080                 8080-dummy-host.example.com (/home/user/bin/conf/extra/httpd-vhosts.conf:11)
                 alias www.8080-dummy-host.example.com
                 wild alias *.8080-dummy-host.example.com