LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 02-10-2007, 03:38 PM   #1
Utapez
LQ Newbie
 
Registered: Apr 2006
Distribution: Edgy PPC,Edgy i686,Mac OSX,PCLinux openSUSE PPC 10.2
Posts: 18

Rep: Reputation: 0
Help with an intranet setup


I have successfully installed Edgy's LAMP server running headless, and additionally,installed SSH server, phpmyAdmin,ProFTPD Server and Webmin 1.320.
Everything is working without error.
Do I need to install, "BIND DNS Server" if this is just an intranet situation?

My plan is to use this server for in house development, not for web hosting via the Internet.
I have read so many versions of how "best" to do this that I am now completely confused.
One idea was to create separate users for each virtual website.
ex. /home/user1/test-site1.dev/
/home/user2/test-site2.dev/
/home/user3/test-site3.dev/
If this is a good plan, then the question is access to these different intranet sites.
In Webmin I created 3 different virtual servers using this template and setting their Document Root accordingly and making them Name-Base servers.
The default for browser access is /var/www/
My static IP is 192.168.0.102 and http://192.168.0.102/? will give me my development sites?
There is some configuration that I have not done because http://192.168.0.102/test-site1.dev gives me "Not Found"
Which config files do I need to edit to add these sites?
Was it correct to make these virtual development sites "Name-Base servers"
I thought since I had a static IP name-base would work best?
Help would be very appreciated.
Thanks!
 
Old 02-10-2007, 04:08 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 3,988

Rep: Reputation: 261Reputation: 261Reputation: 261
You only need BIND if you want to run a DNS server. For a small local network environment I'd say it's easier just to update /etc/hosts on the server and all the client machines.

To make name based virtual hosting work you have to access your sites by the names that they're given in the Apache configuration, e.g. www.site1.com, www.site2.com, etc. You can add entries to your /etc/hosts file to map www.site1.com and www.site2.com to the IP of your server (192.168.0.102) so the clients know to send the request to that IP.
 
Old 02-10-2007, 04:26 PM   #3
natewlew
Member
 
Registered: Jan 2006
Location: USA
Distribution: Any distro I can get my hands on!
Posts: 162

Rep: Reputation: 30
That /etc/hosts file is a lot easier to setup. If I would have known that I wouldn't have needed to setup a DNS server. I guess I needed to learn how to do it anyways.

Would there be a similar way to setup a windows box (/etc/hosts)? I do doubt it.
 
Old 02-10-2007, 04:52 PM   #4
Utapez
LQ Newbie
 
Registered: Apr 2006
Distribution: Edgy PPC,Edgy i686,Mac OSX,PCLinux openSUSE PPC 10.2
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by btmiller
To make name based virtual hosting work you have to access your sites by the names that they're given in the Apache configuration, e.g. www.site1.com, www.site2.com, etc. You can add entries to your /etc/hosts file to map www.site1.com and www.site2.com to the IP of your server (192.168.0.102) so the clients know to send the request to that IP.
Are you saying that I need to change /etc/hosts file on the computer(s) that want to access the development directories? When I created the virtual servers with Apache it reads, Name Server "test-site1.dev" so in the /etc/hosts file I should add 192.168.0.102 test-site1.dev ?
-------------------------------------------
OK so adding 192.168.0.102 test-site1.dev does let my browser find 192.168.0.102 but it goes to the /var/www/ directory not the Document root directory I supplied in Apache when I set up the virtual server?
Help please--
Thank you.

Last edited by Utapez; 02-10-2007 at 05:01 PM.
 
Old 02-10-2007, 05:15 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 3,988

Rep: Reputation: 261Reputation: 261Reputation: 261
Can you post the virtual hosts section of your httpd.conf file? You should learn to read and unserstand this config file rather than relying on webmin to do things for you. It will pay off in the long run when it comes to troubleshooting.
 
Old 02-10-2007, 05:32 PM   #6
Utapez
LQ Newbie
 
Registered: Apr 2006
Distribution: Edgy PPC,Edgy i686,Mac OSX,PCLinux openSUSE PPC 10.2
Posts: 18

Original Poster
Rep: Reputation: 0
I am using Apache2, so the only thing in the file is:

# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so

I guess the call really comes from /etc/apache2/sites-available" ?

<VirtualHost *>
DocumentRoot /home/user1/test-site1.dev/htdocs
ServerName test-site1.dev
<Directory "/home/user1/test-site1.dev/htdocs">
allow from all
Options +Indexes
</Directory>
ScriptAlias /cgi-bin/ "/home/user1/test-site1.dev/cgi-bin/"
LogLevel emerg
CustomLog /home/user1/test-site1.dev/logs/access_log "combined"
</VirtualHost>
 
Old 02-10-2007, 09:31 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 3,988

Rep: Reputation: 261Reputation: 261Reputation: 261
It looks like there's only one virtual host then, unless there's some other config file holding the others that is included in the main conf file. Look for include statements in httpd.conf or grep through any other config files in the Apache config directory to see if there are any other virtual hosts given. If only one is defined then all requests to the server will be directed to that virtual host.
 
Old 02-10-2007, 11:31 PM   #8
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
How-to-Forge has a nice Ubuntu Edgy Perfect Setup tutorial that covers setting up your Edgy box for and ISP like hosting environment, including the Mail, virtual web hosting, etc.. might be worth a peep. it also mentions a nice web front end (ISP Config) to manage it..
 
Old 02-11-2007, 12:15 PM   #9
Utapez
LQ Newbie
 
Registered: Apr 2006
Distribution: Edgy PPC,Edgy i686,Mac OSX,PCLinux openSUSE PPC 10.2
Posts: 18

Original Poster
Rep: Reputation: 0
Thank you for your information and suggestions.
I am doing some reading and reconfiguring on this subject.
 
Old 02-13-2007, 05:47 PM   #10
Utapez
LQ Newbie
 
Registered: Apr 2006
Distribution: Edgy PPC,Edgy i686,Mac OSX,PCLinux openSUSE PPC 10.2
Posts: 18

Original Poster
Rep: Reputation: 0
I have done some reading and some installing.
I did successfully install BIND9 and get it running but...
from the host server I can ping all my virtual servers but any other computer belonging to this lan sees and resolves nothing unless I edit their individual host file... which is why I install BIND9 to avoid that.

What should I be doing (adding, configuring..) to get the other machines to resolve my virtual domains. From the other lan machines they can ftp and ping via the static IP of the server but that's it.

Help.

Thanks.
 
Old 02-13-2007, 05:58 PM   #11
kwidner
LQ Newbie
 
Registered: Feb 2007
Distribution: SuSE 10.2
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by natewlew
That /etc/hosts file is a lot easier to setup. If I would have known that I wouldn't have needed to setup a DNS server. I guess I needed to learn how to do it anyways.

Would there be a similar way to setup a windows box (/etc/hosts)? I do doubt it.

Windows has a host file as well. It is a file named 'hosts' and it will be in a directory C:\WINDOWS\system32\drivers\etc, adjust accordingly for your version of Windows, but that is the directory for WinXP and Win2K I believe.
 
Old 02-13-2007, 08:18 PM   #12
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Quote:
Originally Posted by Utapez
I have done some reading and some installing.


What should I be doing (adding, configuring..) to get the other machines to resolve my virtual domains. From the other lan machines they can ftp and ping via the static IP of the server but that's it.

Help.

Thanks.
Edit the network configuration of your other machines to point to the one running BIND as their DNS Server...

Code:
-------------------------
|    Web HOST / BIND    |
|                       |
| IP    192.168.1.10    |
| MASK  255.255.255.0   |
| GW    192.168.1.1     |
|                       |
-------------------------

-------------------------
| Other PC on LAN       |
|                       |
| IP    192.168.1.12    |
| MASK  255.255.255.0   |
| GW    192.168.1.1     |
|                       |
| DNS/Nameserver        |
|  192.168.1.10         |
|                       |
-------------------------
Quick and dirty that should do it.. basically your other PC's are using a different DNS server to resolve so they do not know about the virtual hosts.. once you point them to your server for DNS you should be set to go.

If you want the Virtual hosts available from over the internet, then you will need to register a domain and configure it to point to your server......
 
Old 02-13-2007, 09:04 PM   #13
Utapez
LQ Newbie
 
Registered: Apr 2006
Distribution: Edgy PPC,Edgy i686,Mac OSX,PCLinux openSUSE PPC 10.2
Posts: 18

Original Poster
Rep: Reputation: 0
2 questions, #1 the file you are suggesting I edit on each lan pc is that "resolv.conf" (they're all linux boxes and macs), yes?

and #2 is there any way you can reference 2 different dns sources (like use my outside ISP's dns and also my server's bind9) ?

Thanks!
 
Old 02-14-2007, 10:07 PM   #14
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
If you configured BIND correctly it will handle Name resolution for not only your local resources but for Internet resources as well.. configuring root hints into your BIND server will allow it to query name servers on the Internet .. you won't need to reference the DNS servers from your ISP.


http://www.linuxfromscratch.org/blfs...rver/bind.html
 
Old 02-15-2007, 08:48 AM   #15
Utapez
LQ Newbie
 
Registered: Apr 2006
Distribution: Edgy PPC,Edgy i686,Mac OSX,PCLinux openSUSE PPC 10.2
Posts: 18

Original Poster
Rep: Reputation: 0
Thank you for your reply, yes it is finding the outside.
now this small issue:
BIND doesn't automatically start. Why I don't know because in "Webmin" in the Bootup and Shutdown section it says ""yes" to start at boot... but no it doesn't-- I have to line command it to start or within Webmin hit the start button in the BIND section.
#1 question how to get BIND to start with server boot?
-------------------------------------------------------------
I think it has something to do with the fact I have a chrooted server,"-u bind -t /var/lib/named" and my "named" has been moved to /var/lib/named
Starting BIND manually it knows where "named" is but not the system boot, where do I need my symbolic link?
Also /etc/default/bind9 DOES have this in it:

OPTIONS="-u bind -t /var/lib/named"
# Set RESOLVCONF=no to not run resolvconf
RESOLVCONF=yes

++++++++++++++++++++++++++++++++++++++++++++
Here's what the system had to say this morning:

Feb 15 07:38:39 firewire-server named[3501]: loading configuration from '/etc/bind/named.conf'
Feb 15 07:38:39 firewire-server named[3501]: /etc/bind/named.conf.options:2: change directory to '/var/cache/bind' failed: file not found
Feb 15 07:38:39 firewire-server named[3501]: /etc/bind/named.conf.options:2: parsing failed
++++++++++++++++++++++++++++++++++++++++++++
OK I put a symbolic link in /var/cache/bind for /etc/bind/named.conf.options and the system started without error, bind said it started but it didn't till I again manually started it. Pls. note that bind9 is in /etc/init.d and /etc/default
Why won't it start on it's own?

Last edited by Utapez; 02-15-2007 at 10:58 AM.
 
  


Reply

Tags
intranet, lamp, server, webmin


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to setup intranet server sc2sick Linux - Newbie 9 05-10-2006 12:55 PM
How do I setup an Intranet? coopns Linux - Networking 5 01-19-2006 10:35 AM
Setup intranet on Fedora Core4 & win98 linux_loogs Linux - Networking 1 09-22-2005 04:41 PM
What makes an intranet an intranet? pembo13 Linux - Networking 3 06-21-2004 08:20 PM
Intranet yadavankur Linux - Networking 2 09-18-2002 11:06 PM


All times are GMT -5. The time now is 05:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration