VirtualHost configuration has gone wrong

Asked 2 years ago, Updated 2 years ago, 48 views

httpd-S shows the following:

port80namevhost example.com(/etc/httpd/conf/example.com.conf:1)
       alias example.net

However, /etc/httpd/conf/example.com.conf contains

ServerName www.example.com
ServerAlias example.com

I don't understand why example.net is happening.

Of course, when I look at example.com from the browser, example.net appears.

Please tell me how to deal with it

Thank you for your cooperation.

Environment

Apache

apache

2022-09-30 17:01

1 Answers

To be honest with the question only, the /etc/httpd/conf/example.com.conf content is

<VirtualHost*:80>
    ServerName example.com
    ServerAlias example.net
    :
</VirtualHost>
    :
<Virtualhost*:80>    
    ServerName www.example.com
    ServerAlias example.com
    :
</VirtualHost>

where httpd-S is

port80namevhost example.com(/etc/httpd/conf/example.com.conf:1)
   alias example.net

You will see .In this case, the output of httpd-S is separate

port80namevhost www.example.com(/etc/httpd/conf/example.com.conf:?)
   alias example.com

There should also be


2022-09-30 17:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.