Results 1 to 10 of 10

Thread: Hosting websites (Ubuntu 8.04 Server).

  1. #1
    Join Date
    Jun 2008
    Beans
    12

    Hosting websites (Ubuntu 8.04 Server).

    Good morning board members.

    I am trying to set up a server where i can host my websites, since my profession is website developper, using Ubuntu 8.04.


    ****************************
    Note:
    There is no bug or problem with an existing guide, just wanted to ask whether I am following the right path and if there are any further guides (if needed).
    ****************************



    Alright, so far I have read various guides and executed followed ones:
    - The Perfect Server - Ubuntu Hardy Heron (Ubuntu 8.04 LTS Server)
    -> Web Server: Apache 2.2 with PHP 5.2.4 and Ruby (worked)
    -> Database Server: MySQL 5.0 (worked)
    -> Mail Server: Postfix (worked)
    -> DNS Server: BIND9 (worked)
    -> FTP Server: proftpd (assuming it worked)
    -> POP3/IMAP: I will use Maildir format and therefore install Courier-POP3/Courier-IMAP. (worked)
    -> Webalizer for web site statistics (assuming it worked)
    -> ISPConfig (did not try install)

    - Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS)
    -> Send local messages and view those via SuirrelMail. (worked)

    - Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Ubuntu 8.04 LTS
    -> Access from local windows machine. (worked)
    -> Seems to be rather slow to get the 'welcome message' from the ubuntu server. (still assuming it worked)

    - DNS server Setup using bind in Ubuntu
    -> No error in the syslog (anymore). (assuming it worked)

    Server data:
    - Servername: lainHost.
    - Hostname: Used 'lainHost.lain.ch' in all guides (did register the domainname at switch.ch).
    - IP-Address: Used 192.168.1.100 in all guides.

    Questions:
    - So basically I am wondering if that is all or if I missed something, which is required to display websites via my ubuntu server.
    -> Do I need a static IP-Address (or am I to change the DNS on switch.ch each day)?
    -> How do I make that local SquirrelMail system global?


    Thank you for reading, every help is appreciated.
    Last edited by Freyja; June 21st, 2010 at 10:58 AM. Reason: Forgot to list Apache as available.

  2. #2
    Join Date
    Feb 2008
    Location
    Naawan, Misamis Oriental
    Beans
    105
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Hosting websites (Ubuntu 8.04 Server).

    Quote Originally Posted by Freyja View Post
    Good morning board members.

    I am trying to set up a server where i can host my websites, since my profession is website developper, using Ubuntu 8.04.


    ****************************
    Note:
    There is no bug or problem with an existing guide, just wanted to ask whether I am following the right path and if there are any further guides (if needed).
    ****************************



    Alright, so far I have read various guides and executed followed ones:
    - The Perfect Server - Ubuntu Hardy Heron (Ubuntu 8.04 LTS Server)
    -> Database Server: MySQL 5.0 (worked)
    -> Mail Server: Postfix (worked)
    -> DNS Server: BIND9 (worked)
    -> FTP Server: proftpd (assuming it worked)
    -> POP3/IMAP: I will use Maildir format and therefore install Courier-POP3/Courier-IMAP. (worked)
    -> Webalizer for web site statistics (assuming it worked)
    -> ISPConfig (did not try install)

    - Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS)
    -> Send local messages and view those via SuirrelMail. (worked)

    - Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Ubuntu 8.04 LTS
    -> Access from local windows machine. (worked)
    -> Seems to be rather slow to get the 'welcome message' from the ubuntu server. (still assuming it worked)

    - DNS server Setup using bind in Ubuntu
    -> No error in the syslog (anymore). (assuming it worked)

    Server data:
    - Servername: lainHost.
    - Hostname: Used 'lainHost.lain.ch' in all guides (did register the domainname at switch.ch).
    - IP-Address: Used 192.168.1.100 in all guides.

    Questions:
    - So basically I am wondering if that is all or if I missed something, which is required to display websites via my ubuntu server.
    -> Do I need a static IP-Address (or am I to change the DNS on switch.ch each day)?
    -> How do I make that local SquirrelMail system global? u


    Thank you for reading, every help is appreciated.
    have u tried to install "Apache"?
    "Some Men See Things As They Are And Say, WHY? I Dreamed Of Things That Never Were And Say, WHY NOT!"

  3. #3
    Join Date
    Jun 2008
    Beans
    12

    Re: Hosting websites (Ubuntu 8.04 Server).

    Thank you for your reply.

    Apache installation was a part of the first guide, sorry I forgot to append it in my post:
    - Web Server: Apache 2.2 with PHP 5.2.4 and Ruby

    PHP works and I can access local websites too.

  4. #4
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,628

    Re: Hosting websites (Ubuntu 8.04 Server).

    Look at this page. it is how got mine going.


    http://ubuntuforums.org/showthread.php?t=632841

  5. #5
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,868
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Hosting websites (Ubuntu 8.04 Server).

    You need your DNS record to point to your external ip address.

    You need to verify port 80 is open and you are able to host from your location.

    You will need to open port 80 on your router and forward that port to the internal ip 192.168.1.100. Also make sure this address is outside the DHCP range of your router to avoid future conflicts.

    To set you DNS record go to your registrar and set your domains A record to point to your ISP provided external ip address.

    To verify your port 80 is open go to canyouseeme.org from inside your LAN and verify port 80 is open.


    A simple early test to verify apache is working is to check it on the local LAN. From inside your LAN on a second computer enter the interal ip address for the server in a browser. You should at least get the default apache2 "it works" page. Then you can set up virtual domains for your test sites, using Name based virtual domains in apache2.

    EDIT: Yes if you have a dynamic ip from your isp, you will need to setup a service such as noip, or dyndns for when the ip changes. Starting with the basics first is a good idea, so set the ip as it is now before setting up dynmic forwarding.
    Last edited by volkswagner; June 21st, 2010 at 12:35 PM.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  6. #6
    Join Date
    Jun 2008
    Beans
    12

    Re: Hosting websites (Ubuntu 8.04 Server).

    Thank you two for your replies.

    Sorry that my feedback took so long, had to read through a few manuals/guides to make the further steps you recommended me.
    Since your suggestions are mostly the same I will only quote one for simplicity.

    You need your DNS record to point to your external ip address.
    So far I have made the following entries:
    ¦---------------------------------------------------------------------------
    ¦ /etc/bind/named.conf.local
    ¦---------------------------------------------------------------------------
    ¦ zone "lain.ch"{
    ¦ type master;
    ¦ file "/etc/bind/zones/lain.ch.db";};
    ¦
    ¦ zone "lain.li"{
    ¦ type master;
    ¦ file "/etc/bind/zones/lain.li.db";};
    ¦
    ¦ zone "1.168.192.in-addr.arpa"{
    ¦ type master;
    ¦ file "/etc/bind/zones/rev.1.168.192.in-addr.arpa";};
    ¦---------------------------------------------------------------------------

    ¦---------------------------------------------------------------------------
    ¦ /etc/bind/named.conf.options
    ¦---------------------------------------------------------------------------
    ¦ options {
    ¦ directory "/var/cache/bind";
    ¦
    ¦ forwarders{
    ¦ 195.186.1.162;};
    ¦---------------------------------------------------------------------------

    ¦---------------------------------------------------------------------------
    ¦ /etc/bind/zones/lain.ch.db
    ¦---------------------------------------------------------------------------
    ¦ lain.ch. IN SOA lainHost.lain.ch. admin.lain.ch.(
    ¦ 2007031001
    ¦ 28800
    ¦ 3600
    ¦ 604800
    ¦ 38400)
    ¦
    ¦ lain.ch. IN NS lainHost.lain.ch.
    ¦ lain.ch. IN MX 10 lainHost.lain.ch.
    ¦
    ¦ www IN A 192.168.1.100
    ¦ mta IN A 192.168.1.100
    ¦ ns1 IN A 192.168.1.100
    ¦---------------------------------------------------------------------------

    ¦---------------------------------------------------------------------------
    ¦ /etc/bind/zones/lain.li.db
    ¦---------------------------------------------------------------------------
    ¦ lain.li. IN SOA lainHost.lain.ch. admin.lain.li.(
    ¦ 2007031001
    ¦ 28800
    ¦ 3600
    ¦ 604800
    ¦ 38400)
    ¦
    ¦ lain.li. IN NS lainHost.lain.ch
    ¦ lain.li. IN MX 10 lainHost.lain.ch
    ¦
    ¦ www IN A 192.168.1.100
    ¦ mta IN A 192.168.1.100
    ¦ ns1 IN A 192.168.1.100
    ¦---------------------------------------------------------------------------

    ¦---------------------------------------------------------------------------
    ¦ /etc/bind/zones/rev.1.168.192.in-addr.arpa
    ¦---------------------------------------------------------------------------
    ¦ @ IN SOA lainHost.lain.ch. admin.lain.ch.(
    ¦ 2007031001;
    ¦ 28800;
    ¦ 604800;
    ¦ 604800;
    ¦ 86400)
    ¦
    ¦ IN NS lainHost.lain.ch.
    ¦ 100 IN PTR lain.ch
    ¦---------------------------------------------------------------------------


    You need to verify port 80 is open and you are able to host from your location.
    Using the command:
    - iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    Gave me the result:
    - ACCEPT tcp -- anywhere anywhere tcp dpt:www

    You will need to open port 80 on your router and forward that port to the internal ip 192.168.1.100. Also make sure this address is outside the DHCP range of your router to avoid future conflicts.
    This one took a while. Now the result of 'canyouseeme.org' is:
    - Success: I can see your service on wh.at.ev.er on port (80)
    - Your ISP is not blocking port 80

    A simple early test to verify apache is working is to check it on the local LAN. From inside your LAN on a second computer enter the interal ip address for the server in a browser. You should at least get the default apache2 "it works" page. Then you can set up virtual domains for your test sites, using Name based virtual domains in apache2.
    I can see the sample 'It works!' website using 'lainHost' or '192.168.1.100' also can see own added sample pages.

    To set you DNS record go to your registrar and set your domains A record to point to your ISP provided external ip address.
    This is the step where I am stuck with currently.

    When I go to my registrar (switch.ch) I can not set any A records, all I can enter are name servers.
    Do I have to enter an other name server, like everydns and put my external IP-Address in their A record or can I put my external address in the name server field of my registrar site?
    Probably I am confusing something here:)

  7. #7
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,868
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Hosting websites (Ubuntu 8.04 Server).

    It seems your registrar does not offer DNS control.

    First you will need to determine if you have a static or dynamic ip address from your provider. This will determine the best path.

    If you have a static ip, then you will need to find a DNS provider offering services. As far as this newbie knows, you cant run your own DNS server from home for WAN. Zoneedit.com or similar shall suffice.

    If you have a dynamic ip address, you will need to set up a service with a dynamic provider such as dyndns.com or noip.com. These providers charge a fee for services when you select your own domain name.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  8. #8
    Join Date
    Jun 2008
    Beans
    12

    Re: Hosting websites (Ubuntu 8.04 Server).

    Thank you again volkswagner.

    I am using a dynamic IP-Address currently. Wanted to setup and test everything before getting a static one, since at least here it is a bit more expensive.
    So I did link my domain to 'everydns.com' (its name servers) on my registrar site and link the A record on 'everydns.com' to my external address.

    It works!

    Thank you, thank you:)
    Will do for now (with changing 'everydns.com' everyday) for testing.

    The only question left for now is, is it possible to set a root directory to domain names in some settings or do I need a script (like a php index page) for this?
    For example 'domainA.com' not going to '/var/www/' but to '/var/www/domainA.com' and 'domainB.com' to '/var/www/domainB.com'.

    Did try to search for it, but hard without really knowing how it is called.

  9. #9
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,868
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Hosting websites (Ubuntu 8.04 Server).

    You will want to set up virtual hosts within apache2.

    Ther server guide or apache wiki should get you started.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  10. #10
    Join Date
    Jun 2008
    Beans
    12

    Re: Hosting websites (Ubuntu 8.04 Server).

    Time for my report:
    + So I set up two virtual hosts, which are working now.
    + Can access both websites from external computers (until my IP-Address changes).
    + Set up rights according to a forum post to 'chmod -R 555 /var/www'.
    - The only step I did not understand in the whole was the DNS setup (DNS server Setup using bind in Ubuntu).

    To do:
    - Setup the local-only working PostFix/SquirrelMail for external usage too.

    Right now, everything is working.
    Thanks to all the helpers and readers. I will post again if any further issues appear.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •