LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-23-2013, 01:17 PM   #1
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432
Blog Entries: 1

Rep: Reputation: 41
Configuring Debian with FQDN, Dynamic IP, virtual hosts


I have a machine at home that I use for development, testing and a "club" site. I'm confused about how to get the hostname correct.

/etc/hostname contains solely "abacus"

"hostname -f" returns abacus

I want it to serve yusko.org and it does. The machine has a dynamic IP which is properly configured to update as necessary.

abacus.yusko.org should be the FQDN I would also like to setup a second domain using the same dynamic IP.
Code:
cat /etc/hosts
127.0.0.1       abacus  localhost.localdomain   localhost
192.168.1.3     abacus.yusko.org        abacus
192.168.1.1     river.yusko.org river

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Once I get this fixed I'm going to use ISPconfig3 to manage the server. So where am I going wrong? Thanks.
 
Old 09-24-2013, 09:56 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

perhaps I'm missing something here, but why don't you change /etc/hostname to have abacus.yusko.org instead of just abacus?

Also normally I think you'd want to replace the first line of your /etc/hosts with the following two lines.
Code:
127.0.0.1 localhost
127.0.1.1 abacus.yusko.org abacus
I can't comment on the 192.168.1.X lines since I don't know your network setup.

Evo2.
 
1 members found this post helpful.
Old 09-25-2013, 02:09 AM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
I would go even step further and remove the entry for abacus from 127.0.0.1 completely. Only use the 192.168... entry which is fine from my sight.

You also might want to try hostname --fqdn which should show you all of the fqdn the system can find configured. Right now it takes just the entry for the 127.0.0.1. You could also try to ping -c 1 -w 2 abacus to see to which ip the system resolves it.
 
Old 09-25-2013, 08:49 AM   #4
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432

Original Poster
Blog Entries: 1

Rep: Reputation: 41
It is my understand thet it is bad practice to put the FQDN in the /etc/hostname file. I thought it was only the machine name and then it was defined in /etc/hosts.

192.168.1.xxx is my local network IP range. My router is configured with ddns and port-forwards pertinent traffic to abacus. (192.168.1.3). This historically works perfectly, but I've been trying to install ISPconfig3 and now I'm running into issues. For instance, it used to serve several development sites perfectly, with only a simple change to /var/www symlink to point to what I wanted to work on. Since I installed ISPconfig3, the document roots all come up 403 - / forbidden. However, the Aliases like those for phpsysinfo, phpmyadmin, and webmail all work as they should. *:8080 comes up as no connection. The port is open, but it seems ISPconfig is not listening. Since the FQDN is not correct, I figured I would start there.

Thanks.
 
Old 09-25-2013, 09:59 AM   #5
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432

Original Poster
Blog Entries: 1

Rep: Reputation: 41
As it sits, no changes yet.....

Code:
root@abacus:/etc/init.d# hostname --fqdn
abacus
root@abacus:/etc/init.d#
Code:
root@abacus:/etc/init.d# ping -c 1 -w 2 abacus
PING abacus (127.0.0.1) 56(84) bytes of data.
64 bytes from abacus (127.0.0.1): icmp_seq=1 ttl=64 time=0.047 ms

--- abacus ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.047/0.047/0.047/0.000 ms
root@abacus:/etc/init.d# ping -c 1 -w 2 abacus.yusko.org
PING abacus.yusko.org (192.168.1.3) 56(84) bytes of data.
64 bytes from abacus.yusko.org (192.168.1.3): icmp_seq=1 ttl=64 time=0.125 ms

--- abacus.yusko.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.125/0.125/0.125/0.000 ms
root@abacus:/etc/init.d# ping -c 1 -w 2 yusko.org
PING yusko.org (67.247.65.204) 56(84) bytes of data.
64 bytes from cpe-67-247-65-204.rochester.res.rr.com (67.247.65.204): icmp_seq=1 ttl=64 time=2.73 ms

--- yusko.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.735/2.735/2.735/0.000 ms
root@abacus:/etc/init.d#
 
Old 09-25-2013, 10:22 AM   #6
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432

Original Poster
Blog Entries: 1

Rep: Reputation: 41
3rd post in a row.... LOL

I figured out i needed to add to the /etc/apache2/sites-enabled/000-ispconfig.conf file

Code:
<Directory /var/www>
       AllowOverride None
       Order Deny,Allow
        Allow from all       
</Directory>
to get the site to load, although it still won't connect on port 8080. Still digging.
 
Old 09-25-2013, 11:30 PM   #7
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432

Original Poster
Blog Entries: 1

Rep: Reputation: 41
Holy Fluffbucket!!!! That was a royal pain in the painfullness.

I FINALLY managed to get ISPconfig3 to fire up on port 8080. I had to add the following line to /etc/apache2/apache2.conf
Code:
IncludeOptional sites-enabled/*.vhost
then I went through both .vhost files and gleaned the -'s and +'s out of them. Now ISPconfig3 runs fine. I also found my answer to my question regarding virtual hosts sharing a dynamic IP here. I guess it isn't that different form a shared static IP.

Last edited by mpyusko; 09-26-2013 at 09:56 AM.
 
Old 09-27-2013, 04:13 AM   #8
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
You are totaly right that /etc/hostname should only have the hostname and no fqdn. FQDNs come from /etc/hosts.

Code:
127.0.0.1   localhost.localdomain   localhost
192.168.1.3     abacus.yusko.org        abacus
192.168.1.1     river.yusko.org river

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
I'd go with this one.

REgarding your ping session this totaly makes sense by your hosts configuration in /etc/hosts.
 
1 members found this post helpful.
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
debian lenny - all virtual hosts lead to first virtual host rantastic Linux - Server 2 04-21-2010 09:32 PM
Configuring Apache and OpenWebMail for Virtual Hosts krasl Linux - Software 5 03-16-2006 08:00 AM
Apache2 Virtual Dynamic Hosts and defaults techrolla Linux - Networking 1 11-01-2004 04:01 PM
Virtual Hosts with Dynamic IP and dyndns.org lexton Linux - Networking 1 08-11-2004 04:06 AM
Configuring Virtual Hosts in Apache 2 w/ Mandrake Linux 9.1. bnscomp Linux - Software 3 10-10-2003 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:53 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration