it seems to be even though i have syntax error in file, config test gives me
ok. is it because it parsed single entry?
you are right if i move my default site on top it gives me that output.
are there any reason it's taking first server entry? rather than giving me 40x
error?
------- Original Message -------
On Wednesday, January 11th, 2023 at 3:55 PM, Crystal Kolipe
<kolip...@exoticsilicon.com> wrote:
> On Wed, Jan 11, 2023 at 09:42:14AM +0000, rahul.dshmkh1 wrote:
>
> > as per httpd.conf file i should be able to match exact one character in
> > server "a?.sitea.com"
> > but when i test this way i am able to visit sitea, below are the test
> > results
> > :~> curl a.sitea.com
> > This is site a
> > :~> curl a1.sitea.com
> > This is site a
> > :~> curl ab1.sitea.com -->> this should not be matched? as there are two
> > characters after a
>
>
> The domain 'ab1.sitea.com' does not match any of the server entries in your
> config.
>
> In this case, the first entry that matches the address and port is used, in
> your case this is 'site a'.
>
> If you add to /etc/hosts:
>
> 192.168.25.11 xyz.example
>
> Then:
>
> ftp -o - http://xyz.example
>
> will show 'site a'.
>
> So maybe you want to move your 'defaultsite' to the top of the config file.
>
> > --------------------------------
> > /etc/httpd.conf
> > server "a?.sitea.com" {
> > listen on * port 80
> > root "/a.sitea.com"
> > }
> >
> > server "b.siteb.com" {
> > listen on * port 80
> > root "b.siteb.com"
>
>
> Why is this not have a leading / like your other entires?
>
> > }
> >
> > server "defaultsite.com" {
> > listen on * port 80
> > root "/defaultsite.com"}
> >
> > -----------------------------------------