Ubuntu 7.04 with Ispconfig - The URL is not reachable!
I have just successfully installed Ispconfig on Ubuntu Server 7.04 and everything went very well (watching Ispconfig install via Putty was as exciting as watching Die Hard 4!!). The only problem I had right at the end was when the ISPConfig install asked me for my Hostname and domain - I kept getting this error :
The URL is not reachable!
I left the Hostname blank and put the static IP of the machine into the Domain name and got to the end of the install which told me to browse to (mystaticip):81 and I wasn't able to do this. The domain was registered a few months ago with DynDNS.org so my question now is how to change my Domain name and Hostname to what they should be. I am new to both Linux and ISPConfig to any help is very much appreciated.
From your description you have a domain registered, which points to the static IP of your router, which forwards traffic to the server?
However, if you are working from a 'local' machine on the same network as your Ubuntu box, they will both have 'internal' network addresses e.g. 192.168.0.X or similar, so any attempt to access the static IP will point you at the internet side of the router.
You need to set up a hosts file entry on the accessing machine to point to the 'internal' address of the Ubuntu box. In Linux/Unix /etc/hosts, in Windows - \Windowsdir\system32\drivers\etc\hosts.
Additionally, you Ubuntu box should have a properly confiured hosts file and hostname file, as per the Perfect Setup instructions.
/etc/hosts contents include
XXX.XXX.XXX.XXX myserver.mydomain.com myserver
where XXX etc is the server IP
On your accessing machine add
XXX.XXX.XXX.XXX myserver.mydomain.com to the hosts file.
Your ISPConfig setup should have that hostname file hostname as it's hostname, and the local 'internal' IP as it's IP.
Thanks for your answer.
You are right about being connected locally - I'll do what you said Chuckl and post later if I can get it worked out.
Router is acting as a DHCP server
A little bit more help if you can chuckl ...
My router (Belkin N1 Wireless Modem-Router) is operating as a DHCP server (I tried to set a static IP for it and noone on my network could connect to the net ... I think this is because my ISP resets and this is the reason why I got a domain name with dyndns -
I followed falko's howto for installing Ubuntu exactly and it configured DHCP (communicating with Belkin I guess) early in the install - then I set a static IP as per the Howto on my Ubuntu box. WAS this the right thing to do in my case?
Thanks in anticipation.
There's usually no right or wrong in this stuff, just 'does it do what you want it to do?'
A typical home or small business setup would be as follows:
You have a broadband internet connection. You either have a static IP address assigned by your ISP, or use DnyDNS or similar to keep track of any EXTERNAL IP changes.
If you have an assigned iP your Belkin router should be set with this as it's external internet IP address.
On the 'other side' of the Belkin you have your 'private' network. This usually uses IP address ranges that are non routable - 192.168.X.X or 10.10.X.X or similar.
Your Belkin needs one of those addresses to communicate with the rest of your network and to pass internet traffic. It would usually be a fixed address, as otherwise your gateway would change unpredictably, losing you your internet connectivity. Note that this is not the same as the external internet IP.
The unit is also often set up as a DHCP server to assign IP addresses in the non routable range you have chosen to other machines on your private network, and to inform them that it is the gateway etc.
In the case of your server, it also needs a fixed IP, for the same reason as the Belkin - otherwise it's a moving target.
Most modem/routers also have a DMZ machine setting, where you would specify a target IP address for any incoming traffic - web traffic, mail etc., and here you would enter your server IP.
Your other machines can use DHCP or be configured with fixed addresses, makes no difference.
Where the problems occur is when you type the url of a site hosted on your server from a private network machine. Your machine will query a DNS server out on the internet, whic will return the external IP of your router, i.e. the internet address of that website.
But you are on the private network, so what usually happens is that your Belkin thinks that you want to configure it, and pops up a logon prompt.
To prevent that you use a hosts file entry. The idea is that before issuing a DNS query, your machine will check it's hosts file. If it finds an entry there for the url it is looking for, it will use that rather than DNS. As long as that IP address is the local private IP of the server, all will work as intended.
There are other ways of achieving this with DNS zones, but I think this is slightly simpler.
To put some numbers to it, lets say you are using 192.168.0.X addresses for your network.
You set your Belkin internal IP to 192.168.0.1 and the DHCP on the Belkin to issue addresses from 192.168.10 to 192.168.0.100, or 200 or whatever takes your fancy, and the gateway address to 192.168.0.1
Set the server IP to 192.168.0.2, and on the other local machines you edit the hosts files to add an entry like
If you have multiple domains on the server, simply add additional entries
Note that www.mydomain.com is NOT the same as mydomain.com, the are 2 entries.
Also note that if you are editing the hosts file on a Windows box, use a command prompt, navigate to the windows\system32\drivers\etc folder and edit hosts with the commandline edit program. i.e. c:\edit hosts
Notepad, Wordpad and most of the like will immediately add a .txt extension to the filename, and you will spend the next week wondering why it does not work.
Editing hosts file to access ISPconfig control panel locally
Thank you again chuckl - that last post is very informative.
I edited the hosts file on my windows pc and added this entry
(where abc replaces the static IP I gave my ubuntu server)
- I type http://www.(mydomainname).com into my browser - I get to the parent directory of my server machine which contains 3 folders:
Index of /
Name Last modified Size Description
apache2-default/ 21-Nov-2004 06:46 -
sharedip/ 04-Sep-2007 16:29 -
webalizer/ 04-Sep-2007 16:11 -
Apache/2.2.3 (Ubuntu) PHP/5.2.1 mod_ssl/2.2.3 OpenSSL/0.9.8c Server at .www.(mydomainname).com Port 80
-- Inside the "sharedip" folder is an ISPConfig page which says:
This IP address is shared. For access to the web site which you look for, enter its address instead of its IP.
For questions or problems please contact the server administrator.
powered by ISPConfig
--I type the static address of my server box into my browser (192.168.abc.abc) and I come to the same parent directory.
Now - If I type 192.168.abc.abc:81 into my browser I get this:
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
Apache/1.3.37 Server at 192.168.abc.abc Port 81
-- So I click on the hint (which is a link) and go nowhere. (maybe because I left the hostname blank at the end of the ISPConfig when it kept saying that the URL is unreachable)
I have 3 questions here please - If my domain name is www.(mydomainname).com and the static IP of my ubuntu server machine is 192.168.abc.abc:
Question 1: Can you please tell me exactly what to write when the ISPConfig install asks -
Please enter the host name (e.g. www):
Question 2: Can you please tell me exactly what to write when the ISPConfig install asks -
Please enter the domain (e.g. xyz.de):
Question 3: If I had edited the hosts file on my windows PC before installing ISPConfig would that have prevented this error:
Please enter the host name (e.g. www):www.(mydomainname).com
Please enter the domain (e.g. xyz.de):192.168.abc.abc
The URL is not reachable![/COLOR]
or does it look like I have done something else wrong?
All I want is to use ISPConfig to set up and maintain my own website from home.
Thanks for your patience.
The good news is that your local machine is now correctly resolving your domain name locally, so you've done all of that hostfile stuff correctly, and you can access the webserver on that machine, however, you haven't actually created any sites yet.
For the rest, some more background is needed.
Firstly, when you install ISPConfig, it installs it's own webserver, a completely separate Apache installation just for ISPConfig, that listens on port 81, rather than port 80.
The main Apache webserver installation is used only for the websites that you create using IspConfig.
In following the Perfect Setup guide, one of the things it told you to do (page 3) was to edit the hosts file and make it look like this (top section):
127.0.0.1 localhost.localdomain localhost
192.168.0.100 server1.example.com server1
and then to type
echo server1.example.com > /etc/hostname
Translating, this means edit the hosts file and put in the fully qualified domain name of your server i.e. server1.example.com.
Then edit the hostname file and put the same name in there.
then check it by typing
They should both produce the same result. If not, reboot. If still not, you have made an error in your editing, repeat until it works.
Obviously the name should reflect your domain and the name you have chosen for your server, and to repeat the server name here is server1. The fully qualified domain name of the server is server1.example.com
Once you have got that right, that is what you enter in the ISPConfig install. If it asks for a server name, enter it. If it asks for the fully qualified domain name of the server, enter it.
And to stress again, your domain name is not www.mydomain.com It is mydomain.com. www.mydomain.com is a subdomain of mydomain.com, that by convention and luck, may happen to contain a website.
You can check if Ispconfig is actually listening on port 81 by typing netstat -tap and looking for an entry for :81 and ispconfig_http. To access the ISPConfig admin path is e.g. IP is server IP
Note the https for secure site.
Final thought, under no circumstances should you call the machine www.mydomain.com or anything like a url address. Name it after a dog or girlfriend or superhero, or stick with server1. The www bit is what gets hosted on the machine, not the machine itself.
Thanks chuckl for making this so clear !!
I edited the hosts file on ubuntu correctly and got the same result when checking
I am thinking my problem was entirely not having edited the hosts file on my local machine before installing ispconfig using putty and also possibly not having blocked out the static IP I gave my ubuntu server from the range used by the DHCP server in my router ... Doh!
again ... thanks for all your wonderful help - what a learning curve this is :p I'm off to fix things up.
|All times are GMT +2. The time now is 11:01.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.