1 |
On 10/30/2020 12:34 PM, Michael wrote: |
2 |
[snip] |
3 |
>>>> vhosts.conf - define my web-site, but I commented everything out in that |
4 |
>>>> file (it is empty) and restarted apache: |
5 |
>>>> /etc/init.d/apache2 restart |
6 |
>>>> |
7 |
>>>> And I can still display my web page. |
8 |
>>>> How is it possible??? |
9 |
>>> |
10 |
>>> I would assume it is possible to still display your website because the |
11 |
>>> main apache2.conf and/or ./sites-available/000-default.conf contain some |
12 |
>>> default settings which specify the DocumentRoot where your website |
13 |
>>> filesystem resides. |
14 |
>>> |
15 |
>>> Your approach to start from first principles by commenting out individual |
16 |
>>> configurations is sound, because you can check in this way what works and |
17 |
>>> what does not. |
18 |
>> |
19 |
>> I check all configuration files for "DocumentRoot" and all the files |
20 |
>> have DocumentRoot commented out (so nothing is active) |
21 |
>> grep -Rnw '/etc/apache2/' -e 'DocumentRoot' |
22 |
>> |
23 |
>> Restarted apache 2.4 and the web-page is still loading :-/ |
24 |
> |
25 |
> ServerRoot specified somewhere? Increase log verbosity and see what it |
26 |
> reports, otherwise I'm out of ideas! |
27 |
|
28 |
Solved. |
29 |
For some reason or another in my /etc/hosts file I had: |
30 |
10.0.0.112 server.ca |
31 |
|
32 |
And apache was accessing my production box1 |
33 |
|
34 |
box1 - production |
35 |
box2 - work in progress |
36 |
|
37 |
I changed in hosts to: |
38 |
10.0.0.112 www.server.ca |
39 |
|
40 |
And apache was resolving accessing box2 only. |
41 |
Strange. |