Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8A1690ED for ; Sat, 24 Mar 2012 13:56:59 +0000 (UTC) Received: (qmail 44411 invoked by uid 500); 24 Mar 2012 13:56:56 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 44358 invoked by uid 500); 24 Mar 2012 13:56:56 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 44350 invoked by uid 99); 24 Mar 2012 13:56:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2012 13:56:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of covener@gmail.com designates 209.85.210.173 as permitted sender) Received: from [209.85.210.173] (HELO mail-iy0-f173.google.com) (209.85.210.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2012 13:56:52 +0000 Received: by iafj26 with SMTP id j26so8087150iaf.18 for ; Sat, 24 Mar 2012 06:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=QcK6PDOwwBEYRpjDFdx6u1m+2UheKWAEs5+IGQL39fM=; b=ooPhNeuUfT9mKUp/d/hFeq6M2aMKXJFEePdrwrg4Y0sdVfTr0US+wJw6K2o8OCnot0 DCw7U+/FKqYN57KkYRuzD2uwskzeZLxY+2Erohm8QtwH1EW6wXs0f+snxVOshyBydwZ6 WNgei6t4RCDAZHDOo9sSR/iAInpepmXLTmRtxh01/I5sv+IxFtrdg3RdYNRlZgIIMVh+ 2VVrzObRWPD8TZYXBnj91SUJR35ZO54CjMstBnCGJ3xlzKbUveeT9QOD6oDWJ/xuw8Pd bbbs97o9CatydSj9Np3/ZIH97fMM9XC2EXJzgN35WW5Zh5nRfp8d6dyx6PTMZR9mvG+2 iqKA== MIME-Version: 1.0 Received: by 10.50.159.198 with SMTP id xe6mr1745758igb.74.1332597388886; Sat, 24 Mar 2012 06:56:28 -0700 (PDT) Received: by 10.50.89.167 with HTTP; Sat, 24 Mar 2012 06:56:28 -0700 (PDT) In-Reply-To: <33544681.post@talk.nabble.com> References: <33544681.post@talk.nabble.com> Date: Sat, 24 Mar 2012 09:56:28 -0400 Message-ID: From: Eric Covener To: users@httpd.apache.org, gchumillas@email.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Re: accessing virtual host from other computer in the same network wrong list, use users@httpd.apache.org. 1) Apache resolves any argument to an IP address at startup and only matches the incoming interface to it 2) Apache chooses the best virtualhost, or set of identical virtualhosts covered by a NameVirtualHost, based on the incoming interface. 3) If NameVirtualHost was used, it then looks at ServerName and ServerAlias in the vhosts from step 2. On Sat, Mar 24, 2012 at 9:50 AM, Cequiel wrote: > > Hi Everyone. > I'm not sure if this is a bug. In any case, here is my problem. I have an > Ubuntu 11.10 machine and an Apache server running on it. Also, I have a > virtual host registered on my Apache server. I have no problem accessing = to > my virtual host from my local machine. I just open the following url > http://mysubdomain.localhost and works perfectly. > > The problem is that I want to access to my virtualhost from another compu= ter > connected at the same router. The IP of my ubuntu machine is 192.168.1.5 > (for example) and the Windows computer is 192.168.1.10 (for another > example). In the windows computer I added a new entry at the end of the > "hosts" file to override the previous url: > > 192.168.1.5 =A0http://mysubdomain.localhost > > So when I try to open http://mysubdomain.localhost from my Windows machin= e, > it tries to connect to the Ubuntu Apache server. > > The problem is that when I open http://mysubdomain.localhost from my Wind= ows > machine, the browser shows the default page, instead of the mysubdomain > page. And I don't know why this is happening. > > Here's the configurations files located at /etc/apache2/sites-available: > > /etc/apache2/sites-available/default: > ------------------------------------------ > > =A0 =A0 =A0 =A0ServerAdmin webmaster@localhost > > =A0 =A0 =A0 =A0DocumentRoot /var/www > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Options FollowSymLinks > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0AllowOverride None > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Options Indexes FollowSymLinks MultiViews > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0AllowOverride None > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Order allow,deny > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0allow from all > =A0 =A0 =A0 =A0 > > =A0 =A0 =A0 =A0ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0AllowOverride None > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Options +ExecCGI -MultiViews +SymLinksIfOw= nerMatch > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Order allow,deny > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Allow from all > =A0 =A0 =A0 =A0 > > =A0 =A0 =A0 =A0ErrorLog ${APACHE_LOG_DIR}/error.log > > =A0 =A0 =A0 =A0# Possible values include: debug, info, notice, warn, erro= r, crit, > =A0 =A0 =A0 =A0# alert, emerg. > =A0 =A0 =A0 =A0LogLevel warn > > =A0 =A0 =A0 =A0CustomLog ${APACHE_LOG_DIR}/access.log combined > > =A0 =A0Alias /doc/ "/usr/share/doc/" > =A0 =A0 > =A0 =A0 =A0 =A0Options Indexes MultiViews FollowSymLinks > =A0 =A0 =A0 =A0AllowOverride None > =A0 =A0 =A0 =A0Order deny,allow > =A0 =A0 =A0 =A0Deny from all > =A0 =A0 =A0 =A0Allow from 127.0.0.0/255.0.0.0 ::1/128 > =A0 =A0 > > > > > /etc/apache2/sites-available/mysubdomain.localhost: > ------------------------------------------------------------- > NameVirtualHost 127.0.0.1:80 > > =A0 =A0 =A0 =A0ServerName mysubdomain.localhost > =A0 =A0 =A0 =A0DocumentRoot /home/gonzalo/Projects/mysubdomain/htdocs > =A0 =A0 =A0 =A0ErrorLog /home/gonzalo/Projects/mysubdomain/logs/error.log > =A0 =A0 =A0 =A0CustomLog /home/gonzalo/Projects/mysubdomain/logs/access.l= og > combined > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Options Indexes FollowSymLinks MultiViews > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0AllowOverride All > =A0 =A0 =A0 =A0 > > > > Thank you very much and sorry my English. Greetings from Spain :) > Gonzalo. > -- > View this message in context: http://old.nabble.com/accessing-virtual-hos= t-from-other-computer-in-the-same-network-tp33544681p33544681.html > Sent from the Apache HTTP Server - Bugs mailing list archive at Nabble.co= m. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org > For additional commands, e-mail: bugs-help@httpd.apache.org > --=20 Eric Covener covener@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org