Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

configure apache to work in privet and public network

Status
Not open for further replies.

hdamis

ISP
Feb 7, 2005
75
JO
Hello,
I host web site on apache and tomcat and connected them via mod_jk on fedora core 4 and it works perfectly .
Server has 2 Ethernet card one public ip and one privet ip ,
Suppose My domain name is domain.com I registered my domain name at ISP the problem is the dns of the ISP is always goes down , so I tried to allow the local network to access the site by the private ip during the ISP DNS down , but when I configured apache as :

<VirtualHost domain.com:80>
DocumentRoot /var/ ServerName domain.com
DirectoryIndex index.html
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost 10.1.1.5:80>
DocumentRoot /var/ ServerName 10.1.1.5
DirectoryIndex index1.html
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

Where index.html redirect to And index1.html redirect to I tested it and it works but when the ISP DNS goes down both are not working, know that I use ISP DNS as preferred DNS .
Could any one can help,
 
You should only need the first virtualhost :80 definition for all your traffic.

IF your apache is set to Listen on port 80 (i.e. wildcard for IP) then your problem is NOT an apache configuration problem.

You need to ensure your server's networking will accept/forward requests on port :80 from any network source. This is an internal routing and firewall management activity.

Also, the DNS seems to be your biggest problem. You could easily solve this a number of ways.
-- Publish your domain/webserver host in a 'hosts' file on your local machines.
-- Nominate one or more machines in your network as DNS servers/resolvers for your clients, thus YOU can define the zone resolution for them, and allow public DNS requests to be resolved and returned from your ISP.
-- Have clients access your server by IP address
-- Use a more reliable public DNS resolver for all of your client's domain traffic, which should also resolve for your webserver's public IP address.

Don't rig up Apache to solve your infrastructure limitations.



D.E.R. Management - IT Project Management Consulting
 
Thank you very much for your reply,
but why when the ISP DNS is up both links work and when the ISP DNS is down both links not work .
 
Let me try to understand by asking some checking questions...

In your scenario of "ISP DNS is up":

-- both work.

If your scenario of "ISP DNS is down":
-- neither work.

Is that what you're saying?

If so, my questions:
-- What, exactly, is "breaking" when the ISP DNS is not up. Is it their DNS service going offline? Servers going down? Entire network connectivity going down?

-- Do you have a router or other network device that is depending upon the "DNS" to provide connectivity between your clients and the 10.1.1.5 side of the Apache machine?

-- Can you ping 10.1.1.5 when the "DNS is down"?

-- What do you see when you try to reach 10.1.1.5 at index1.html when "DNS is down"???

-- Have you checked the error log for any information from Apache?

-- Have you checked the access log for any information from Apache?

You have to understand that your description of "DNS is down" is VERY vague and can mean lots of problems that are potentially NOT related to Apache. The more information you can provide the better.






D.E.R. Management - IT Project Management Consulting
 

yes there DNS servivr going down and some times the connectivity going down so ping the public IP and request time out .

I don't have any router device and I always can ping 10.1.1.5 when the DNS down .

-- What do you see when you try to reach 10.1.1.5 at index1.html when "DNS is down"???

no thing a blank page .
even though on the server I see no thing only blank page .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top