Hello Ammar,
 
I happed to be setting up Name Based Virtual Hosting using 2 (A)
records to the same IP when this thread started so I have been following
when I have minute.  Here are some things I would try, but please
understand that I'm not an expert with Apache although I did get it to
work inside and of firewall appliances.
 
This sounds like it has to be a DNS resolution issue.  It you can't
telnet, because the host does not resolve I would not expect a browser
to find the machine.  Fix host resolution and make the telnet host error
go away and you will fix your issue.
 
I would try the following:
1) ipconfig /flushdns  --> make sure you start fresh if any DNS changes
were made.
 
2) nslookup on any names you are using in your virtual hosts
configuration and make sure they resolve from the machine that has the
browser.  Steps below may help find the issue.  
 
3) Assuming you have a firewall do the nslookup from outside and inside
and compare the results.  If it does not resolve on the outside you may
need to change public DNS.  See step 4 before making this change.
 
4) Before making a DNS change you can use the /etc/hosts (forget where
on windows but it is there) to test that it is your issue.  Change the
hosts file on the machine that is calling the Apache server so that the
name you use resolves to the IP of the Apache Host. if it happens to be
the same machine I suppose this will still work but better to test from
another machine on your network.  The hosts file is looked at before DNS
so this should ensure you are pointing to the correct machine.  The fact
that localhost resolves on the same machine makes me confident that a
change to the hosts file and ultimately DNS will fix you problem.
I hope this is remotely helpful.
 
Regards,
-Chris

>>> Ammar Hassan <amr...@live.jp> 10/15/2013 8:15 PM >>>
Hi Vincenzo,

Thanks for the tip, the firewall was up, but even when I disabled that,
there was still the same response. I tried telnet and curl. Curl gives
me host resolution error. Telnet connect fails.

When I use the ServerName and localhost from the server the apache is
on, it works perfectly. The domain also works with the IIS on the same
machine. Only Apache is not getting requests from outside, I wonder
why.

Regards,
Ammar

--------------------------------------------------------------------------------------------------------

From: v.dam...@gmail.com
Date: Tue, 15 Oct 2013 15:24:59 +0200
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache Virtual Host Config issue

Hi Ammar,
if Apache is running on a windows server may be you have a problem with
your firewall.Try to shut it down temporarily.
And don't trust your browser, in many cases it could cache http
answers, dns answers and even negative answers.

Just to be sure you are able to reach your server, you should try from
command line a tool like curl or wget.Even telnet could be used if you
know how to do it. 
This should work:



curl -vv -I 211.80.39.244:8080




2013/10/15 Ammar Hassan <amr...@live.jp>


Dear Vincenzo,



Thank you for the insight. My IP address is something else I just used
123.45.6.789 as an example, my server's ip is 211.80.39.244.



Now I have removed the ip from httpd.conf and tried accessing the
computer with computer name.



IIS works,

APACHE works if accessed from the machine itself. It does not serve the
web page if any other machine accesses it with machine name.



Why is that?



---------------------------------------------------------------------------------------------------------

CC: users@httpd.apache.org

From: v.dam...@gmail.com

Date: Mon, 14 Oct 2013 09:58:22 +0200

To: users@httpd.apache.org

Subject: Re: [users@httpd] Apache Virtual Host Config issue



Hi Ammar,

usually you don't put "Listen" directive inside your vhost
configuration.And you cannot have an IP address like 123.45.6.789. "IP
Addresses are canonically represented in dot-decimal notation, which
consists of four decimal numbers, each ranging from 0 to 255"(
http://en.wikipedia.org/wiki/IP_address )



If you what specify an IP address you should choose between the
addresses configured on your server.On the other hand, why do you need
to specify a different IP address?

As far as I see now you have your apache up and running on port 8080
and has bind all available IP addresses. Which for your test should be
perfect (IMHO). 

May be your problem is only that you want connect to your server using
an IP address not available. An IP not configured on your server.

Best,Vincenzo



On 14/ott/2013, at 01:51, Ammar Hassan <amr...@live.jp> wrote:



Please help me sort this out. What is it that I am doing wrong here.







----------------------------------------

From: amr...@live.jp

To: users@httpd.apache.org

Date: Thu, 10 Oct 2013 12:36:29 +0900

Subject: RE: [users@httpd] Apache Virtual Host Config issue



Yehuda,



Actually there were two entries as you rightly pointed out.



TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING

TCP    [::]:8080              [::]:0                 LISTENING





The one other Listen directive I have in my httpd.conf is



Listen 8080



Then in vhosts I have



Listen 123.45.6.789:8080



The subdomain is resolving to the IP (the one I mentioned is just an
example) the ping is fine, When I browse the website with localhost:8080
or from LAN ip 192.168.0.1:8080 the site works perfect.







As a test, I mapped the subdomain on a dummy IIS website, when I
browsed it, it worked fine.

When I put 8080 at the end of the domain it says server timed out.



-Ammar



________________________________

From: yeh...@ymkatz.net

Date: Wed, 9 Oct 2013 23:10:18 -0400

To: users@httpd.apache.org

Subject: Re: [users@httpd] Apache Virtual Host Config issue



On Wed, Oct 9, 2013 at 11:03 PM, Ammar Hassan

<amr...@live.jp<mailto:amr...@live.jp>> wrote:

Thank you for a detailed reply. I have gone through the things you

asked me to check. There was an entry in netstat -an like this:



TCP [::]:8080 [::]:0 LISTENING



Which suggests that Apache is running. So now what I did was, I tried

to add a Listen directive to the IPAddress the subdomain was resolving

to.



If that was the only line that matched, apache is only listening on
IPv6.



Listen 123.45.6.789:8080

Do you have other listen lines in your configuration?

It might help to enable the server info module and see if there are
any

listed in its output.



I also added a virual host entry explicitly for this IP

<VirtualHost 123.45.6.789:8080>

ServerName subdomain.example.com<http://subdomain.example.com>

</VirtualHost>

You should not add a virtual host unless you want it to have different

content or configuration.

Otherwise it will make this harder.



When I restarted Apache it failed with the following error:

"Context of the address was (OS 10049) request is invalid. : AH00072:

make_sock: could not bind to address 123.45.6.789:8080"



Are you sure it points to that address? That is not a valid IP address

which would explain why apache can't bind to it.



- Y

---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org

For additional commands, e-mail: users-h...@httpd.apache.org

                         
ТÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐÐ¥Fò
Vç7V'67&–&R RÖÖ –â W6W'2×Vç7V'67&–&T ‡GG Bæ   6†Ræ÷&pФf÷"  FF—F–öæ Â
6öÖÖ æG2 RÖÖ –â W6W'2Ö†VÇ  ‡GG Bæ   6†Ræ÷&pÐ



---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org

For additional commands, e-mail: users-h...@httpd.apache.org





-- 
Vincenzo D'Amore
email: v.dam...@gmail.com
skype: free.dev
mobile: +39 349 8513251      
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



The information contained in this e-mail and any accompanying documents
may contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if
this message has been addressed to you in error, please immediately
alert the sender by reply e-mail and then delete this message, including
any attachments. Any dissemination, distribution or other use of the
contents of this message by anyone other than the intended recipient is
strictly prohibited.

Reply via email to