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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Host multiple domains for use with Java Webserver 7

Status
Not open for further replies.

fieryhail

IS-IT--Management
Mar 12, 2010
92
Hello Everyone,

I'm pretty new to Solaris but hav some familiarity with linux and BSDs. I'm trying to setup a webserver based on Solaris 10 x86 (64-bit). ON a fresh install I installed parts of the Java Enterprise System 7, namely the GlassFish 2.1.1 and Java Webserver 7. I have a domain that is through my ISP and my main website which is on their DNS and that is appearing to be working fine. I have some domains from GoDaddy as well that I would also like to host on this box using JWS7. I know that most liley I will need to install the MySQL as well as the PHP add-on for JWS but I'm not to that point yet. Right now I am having an issue with DNS. I do have Webmin installed and running fine and I created a zone for one of the domains (something.net) and added ns1.something.net and ns2.something.net as well as an A record for it is not working. I know my issue is most likely coming down to DNS which is admittedly a weak point for me. The Solaris box (hostname=unix02.domain.com) is assigned a private IP as it is behind a PIX. I have the proper NAT configuration on the PIX to allow the necessary ports I'm pushing out as well as the udp 53 for dns, my issue is configuring Solaris as a DNS server I think is the best way to put it. In the network config I have 3 DNS server IPs, the 2 from my ISP and the local private IP. I greatly appreciate any assistance with this matter. CLI or GUI assistance either way is great I'm comfortable with either. Thanks very much in advance.
 
Good question, I may be wrong but this is what I believe to be correct. Please correct me if I am in error. The server is replacing a Windows 2003 Server that was running Plesk 8. The Plesk system required that DNS Server be setup in Server 2003 and the domains from GoDaddy, etc. all had to have their NS, A, and CNAME records in there in order for the sites to function.

If I do NOT have a DNS server running, than how are the domains going to be resolved? On a side note, I also want to use the same DNS server to supply DNS for local hosts inside the network so that I don't need to edit lots of hosts files.

Using GoDaddy as an example, in order for me to host the sites associated with the domains purchased from them I need to have 2 nameservers, ns1.domain1.com and ns2.domain1.com. ALthough both of these NS records can point to a single routable IP. So from my understanding I just point them to a routable IP that NATs back on udp/53 to the Solaris box but then the Solaris box would have to be running a DNS server. My understanding is that if DNS queries are being sent to the Solaris box, then JWS would server up the appropriate content, I know I simplified it some but I am also still very new to the JWS itself. If I should supply more information please let me know. To summarize, I need DNS for internal-only hosts as well as domains that need to be resolveable to the internet. Thanks in advance.
 
Update to this thread. I configured BIND DNS in Solaris and now have access to internally hosted resources as well as internet connectivity. However, I think I may still be doing something wrong. The config is as such:

Solaris Box: 192.168.20.5 / 255.255.255.0
This gets NATted out to a routable IP by the PIX

I created a zone file for test1.com (/var/named/db.test1.com)
The domain is purchased from GoDaddy. The nameservers at GoDaddy are registered as ns1.test1.com and ns2.test1.com, they both point to the rutable IP I have NATted to the Solaris box.

I have JWS7 running a site for and I know it is working fine because if I edit a host file on a local system (192.168.20.5 the web content displays as it ought to.

I am unable to access the site from a system connected outside the network (internet)

my zone file for test1.com is as such:

; /var/named/db.test1.com - Created on 06/01/2010
;

; REFRESH INTERVALS, ETC.
;
@ IN SOA test1.com. hostmaster.test1.com. (
2010060101 ; DB Serial Number
10800 ; Secondary Refresh Interval
3600 ; Secondary AXFR Retry Interval
604800 ; Unref Secondary Expiry Interval
86400 ) ; Minimum Time To Live

; NAME SERVICE
;
IN NS ns1.test1.com
IN NS ns2.test1.com

; MAIL
;
IN MX 10 test1.com.

; HOSTS WITH THIS DOMAIN NAME
;
test1.com. IN A 192.168.20.5
www IN CNAME test1.com.
ftp IN CNAME test1.com.
mail IN CNAME test1.com.
------------

Did I do something wrong with the zone file?

Is there something else with Solaris that I must do? Unsure at this point. I do believe that my issues are with DNS moreso than JWS7 at this point. If I am able to access the content properly with a hosts file entry. Thanks in advance for any assistance.
 
Got it straightened out, needed the routable IP in the zone file and now things work perfectly. Java Web Server seems to be excellent. After going through some work and recompiling PHP and reinstalling mysql (32-bit as opposed to 64-bit) it works great with PHP content also. I think I'm liking it better than the tried and true Apache. For my needs it appears better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top