From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 832B9138359 for ; Sun, 1 Nov 2020 10:05:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B6C5E0843; Sun, 1 Nov 2020 10:04:57 +0000 (UTC) Received: from mail-gw.thundermail.uk (mail-gw.thundermail.uk [149.255.60.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E7DF5E0830 for ; Sun, 1 Nov 2020 10:04:56 +0000 (UTC) Received: from mailgw01.thundermail.uk (mail-gw.thundermail.uk [149.255.60.66]) by mail-gw.thundermail.uk (Postfix) with ESMTPS id 326C0600008F for ; Sun, 1 Nov 2020 10:04:54 +0000 (GMT) X-ASG-Debug-ID: 1604225092-0554137d6d2598e80001-LfjuLa Received: from cloud307.thundercloud.uk (cloud307.thundercloud.uk [149.255.58.40]) by mailgw01.thundermail.uk with ESMTP id zE47Hrk4XTVBRsQB (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 01 Nov 2020 10:04:52 +0000 (GMT) X-Barracuda-Envelope-From: confabulate@kintzios.com X-Barracuda-Effective-Source-IP: cloud307.thundercloud.uk[149.255.58.40] X-Barracuda-Apparent-Source-IP: 149.255.58.40 Received: from lenovo.localdomain (230.3.169.217.in-addr.arpa [217.169.3.230]) by cloud307.thundercloud.uk (Postfix) with ESMTPSA id 88365CEA9B8 for ; Sun, 1 Nov 2020 10:04:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kintzios.com; s=default; t=1604225092; bh=qbDQQSTM5CWE4nHnasz+iKMU8uCD2Y5a3Iq+ku5HsAc=; h=From:To:Subject; b=FQbDdhfMFHEQyKjNFXphvN++IAy61C8cUvt7Rw/X/sqjPvs83ri4VYfi/TxAEV28x dYRgvlmVWv1Ubpm/SZcqd3NivhQCIZO/KTLLXlxfiWiln44AyBKW1mvMX+qrX3hAUc DYUlgLPPCERNSFLFepQEvur5EWUGFdjbY1doTKZI= Authentication-Results: cloud307.thundercloud.uk; spf=pass (sender IP is 217.169.3.230) smtp.mailfrom=confabulate@kintzios.com smtp.helo=lenovo.localdomain Received-SPF: pass (cloud307.thundercloud.uk: connection is authenticated) From: Michael To: gentoo-user@lists.gentoo.org Subject: Re: [SOLVED] [gentoo-user] Apache 2.4 can not access server subdirectory Date: Sun, 01 Nov 2020 10:04:28 +0000 X-ASG-Orig-Subj: Re: [SOLVED] [gentoo-user] Apache 2.4 can not access server subdirectory Message-ID: <7166362.EvYhyI6sBW@lenovo.localdomain> In-Reply-To: <1731f0f7-ac6e-5c22-b87f-36de847483c6@sys-concept.com> References: <7b3d3416-77b0-02eb-ad05-f717fdf0b6a4@sys-concept.com> <1859619.jZfb76A358@lenovo.localdomain> <1731f0f7-ac6e-5c22-b87f-36de847483c6@sys-concept.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3561683.kQq0lBPeGt"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-PPP-Message-ID: <20201101100451.214899.57537@cloud307.thundercloud.uk> X-PPP-Vhost: kintzios.com X-Barracuda-Connect: cloud307.thundercloud.uk[149.255.58.40] X-Barracuda-Start-Time: 1604225092 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://149.255.60.66:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at thundermail.uk X-Barracuda-Scan-Msg-Size: 2651 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.9 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.85579 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Archives-Salt: fdc351b9-5b71-472c-a8d3-6be2badf2d7f X-Archives-Hash: 58c209214ba5ef80621ec8f027c186aa --nextPart3561683.kQq0lBPeGt Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" On Sunday, 1 November 2020 05:01:48 GMT thelma@sys-concept.com wrote: > On 10/30/2020 12:34 PM, Michael wrote: > [snip] > > >>>> vhosts.conf - define my web-site, but I commented everything out in > >>>> that > >>>> file (it is empty) and restarted apache: > >>>> /etc/init.d/apache2 restart > >>>> > >>>> And I can still display my web page. > >>>> How is it possible??? > >>> > >>> I would assume it is possible to still display your website because the > >>> main apache2.conf and/or ./sites-available/000-default.conf contain some > >>> default settings which specify the DocumentRoot where your website > >>> filesystem resides. > >>> > >>> Your approach to start from first principles by commenting out > >>> individual > >>> configurations is sound, because you can check in this way what works > >>> and > >>> what does not. > >> > >> I check all configuration files for "DocumentRoot" and all the files > >> have DocumentRoot commented out (so nothing is active) > >> grep -Rnw '/etc/apache2/' -e 'DocumentRoot' > >> > >> Restarted apache 2.4 and the web-page is still loading :-/ > > > > ServerRoot specified somewhere? Increase log verbosity and see what it > > reports, otherwise I'm out of ideas! > > Solved. > For some reason or another in my /etc/hosts file I had: > 10.0.0.112 server.ca > > And apache was accessing my production box1 > > box1 - production > box2 - work in progress > > I changed in hosts to: > 10.0.0.112 www.server.ca > > And apache was resolving accessing box2 only. > Strange. server.ca != www.server.ca The first is a FQDN, the second is a subdomain of it. You can set up aliases in /etc/hosts of a PC: 10.0.0.112 server.ca www.server.ca prod.server server All of the above will allow the PC to resolve the FQDN and any aliases to host 10.0.0.112 and look for a listening webserver on appropriate ports. The web server should be listening on an appropriate port, or port and IP address, here 10.0.0.112. Typically the server is listening on all IPs on port :80 in the apache configuration files: Listen *:80 This can be different for each Vhost served by this webserver, but make sure there are no overlapping Listen directives on the same port, or the server will error out. https://cwiki.apache.org/confluence/display/HTTPD/CouldNotBindToAddress Then on each VirtualHost section you can specify whatever ServerName and ServerAlias you need to make sure your are accessing the correct Vhost and its corresponding filesystem: https://httpd.apache.org/docs/2.4/vhosts/name-based.html --nextPart3561683.kQq0lBPeGt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAl+eiCwACgkQseqq9sKV Zxns3BAApSPn5xxFsEmRzqGGHXDAIl9qFD0SUpR5VxTalD0QhPw3R0XGxmx1Flg5 hkh3dvWvGUxhrrpQe0olFJO5M8aH/WCYxn2LxHsyJs7to3fZz1HLBe/dy4OSZxCs vcz2fALc3vhWzg2JTwo4fgn1QeRjCT+gNrU49CkQVb3ryDPC/FZvFTT2xDVjxcwB bGhi4EmXfD1bLLN9mQWjaADIahaV1t/kTtyHqh4knuoyuH/tjF+MhVVIlsyyTmvo L5avNocHoHisjUXd38mCdcNZXGm0gvUhINrF4pFFIh94RUV9LjctqkEsrU75xdPe kYWY3CqWjon3CnC+5pIQvPJ0Pc0dFZsE39QSTDRAdT2Yn6D/f1m4DIBRggqD/kc1 CdlxdU3Unitmwb8xqx4i+UVyGQx2SDYZHkiKyyXTiV5+I2V13nI28VqGGf4Afi54 +4JnGaCP4pOLFWn9rQTvd9taEAqQETbOhdSisWaavGHEUFiMDrmGwCkFE+xXHNQp vG+nRWhjONpZH6BASz6c4lIrfQ77NH4QX3nmgVpxWSIbYG+FXCjXV7JZ35w0EPye pH1FhRjf/qekCaT6SOCsADiqJH1wYo/1uSYikfVk8zOwO6GgS9dMrSZ+WxBZ1Xqj u13ITsYfkV/jczz0GaPUKFbpwumBdwMIbEm99rwRzhjb15/xi5o= =2hsG -----END PGP SIGNATURE----- --nextPart3561683.kQq0lBPeGt--