Re: accessing virtual host from other computer in the same network

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wrong list, use users@xxxxxxxxxxxxxxxx.

1) Apache resolves any <virtualhost> 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 <gchumillas@xxxxxxxxx> 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 computer
> 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  http://mysubdomain.localhost
>
> So when I try to open http://mysubdomain.localhost from my Windows machine,
> it tries to connect to the Ubuntu Apache server.
>
> The problem is that when I open http://mysubdomain.localhost from my Windows
> 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:
> ------------------------------------------
> <VirtualHost *:80>
>        ServerAdmin webmaster@localhost
>
>        DocumentRoot /var/www
>        <Directory />
>                Options FollowSymLinks
>                AllowOverride None
>        </Directory>
>        <Directory /var/www/>
>                Options Indexes FollowSymLinks MultiViews
>                AllowOverride None
>                Order allow,deny
>                allow from all
>        </Directory>
>
>        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>        <Directory "/usr/lib/cgi-bin">
>                AllowOverride None
>                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>                Order allow,deny
>                Allow from all
>        </Directory>
>
>        ErrorLog ${APACHE_LOG_DIR}/error.log
>
>        # Possible values include: debug, info, notice, warn, error, crit,
>        # alert, emerg.
>        LogLevel warn
>
>        CustomLog ${APACHE_LOG_DIR}/access.log combined
>
>    Alias /doc/ "/usr/share/doc/"
>    <Directory "/usr/share/doc/">
>        Options Indexes MultiViews FollowSymLinks
>        AllowOverride None
>        Order deny,allow
>        Deny from all
>        Allow from 127.0.0.0/255.0.0.0 ::1/128
>    </Directory>
>
> </VirtualHost>
>
>
> /etc/apache2/sites-available/mysubdomain.localhost:
> -------------------------------------------------------------
> NameVirtualHost 127.0.0.1:80
> <VirtualHost mysubdomain.localhost:80>
>        ServerName mysubdomain.localhost
>        DocumentRoot /home/gonzalo/Projects/mysubdomain/htdocs
>        ErrorLog /home/gonzalo/Projects/mysubdomain/logs/error.log
>        CustomLog /home/gonzalo/Projects/mysubdomain/logs/access.log
> combined
>        <Directory /home/gonzalo/Projects/mysubdomain/htdocs/>
>                Options Indexes FollowSymLinks MultiViews
>                AllowOverride All
>        </Directory>
> </VirtualHost>
>
>
> Thank you very much and sorry my English. Greetings from Spain :)
> Gonzalo.
> --
> View this message in context: http://old.nabble.com/accessing-virtual-host-from-other-computer-in-the-same-network-tp33544681p33544681.html
> Sent from the Apache HTTP Server - Bugs mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bugs-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: bugs-help@xxxxxxxxxxxxxxxx
>



-- 
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux