OSX411.com: Using Mac OS X Server to host websites from home - OSX411.com

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

Using Mac OS X Server to host websites from home

#1 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 20 February 2010 - 05:30 PM

With Apple introducing the Mac mini server I'm sure there will be an explosion of websites hosted at home. In this post I'll try to give a quick overview of how to host your websites from a Mac mini at home.

The first hurtle is owning a domain name, after you've got a domain name you need some way of pointing that domain name to your server and that can be a little tricky depending on your ISP. If you've got a dynamic IP, one that can change at any time then you'll need to look into a service like DynDNS.com's Zone Level Services to route everything to your Mac mini when your IP changes. DynDNS.com has a free daemon that's always running in the background on your server, when it notices an IP address change it will update all your accounts at DynDNS.com. Although the daemon is free, their zone level services are not, they cost around $30 per year per domain. You can however get a free hostname from them, for example myname.dyndns.org.

Attached Image: dyndns-roberthodgen.png
After you've got everything set up so your domain name is pointing towards your server make sure you've got your Mac mini open on port 80 (Web) and any other services you want (like FTP, AFP, VNC, etc.). You need to do this through both your router and firewall on the server (if the firewall service is running).

Attached Image: server-admin-enable-web.png
To enable the Web services on OS X Server, open Server Admin.app under Server in Applications. Under Settings and the Services tab, check the Web service and save the configuration.

After the web service is enabled, go to it and under Sites you should see the default. If you went to your wbesite now you should see a page generated by OS X Server. The Web Folder is the location where the files are stored. I would recommend creating a new folder and new host, setting the Web Folder to the new location and adding your domain name to the Aliases list. I would also recommend adding www.yourdomain.tld to the aliases list.

Attached Image: server-admin-web-location.pngAttached Image: server-admin-web-aliases.png
After you copy the files for your website into the web folder your website should work. So long as you don't require any additional services like MySQL you should be set.
Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#2 User is offline   JasonH 

  • First Member
  • Group: Moderators
  • Posts: 26
  • Joined: 18-February 10

Posted 22 February 2010 - 04:42 PM

What GUI would you suggest for managing sites with MySQL? SQLWorkbench, phpamyadmin?
0

#3 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 22 February 2010 - 05:36 PM

What I use to administer the MySQL server are the MySQL GUI Tools from sun. Their tools are cross platform and work great on Mac OS X Server. Server Admin.app basically only lets you enable the MySQL service and change its data store location (which I don't suggest doing, I broke MySQL on OS X Server by changing the location of the data store).
Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#4 User is offline   xphi1e 

  • New Member
  • Group: Members
  • Posts: 3
  • Joined: 16-November 10
  • Location:Sebring Florida

Posted 16 November 2010 - 04:12 PM

I bought a domain name from GoDaddy. My ISP assigned me a static IP. Mac Mini server is configured as per the instructions here (I think) but I still cannot get to my sight. Am I correct that I needed to forward my domain to the static IP? Is there a step that I'm missing?
0

#5 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 16 November 2010 - 05:59 PM

 xphi1e, on 16 November 2010 - 04:12 PM, said:

I bought a domain name from GoDaddy. My ISP assigned me a static IP. Mac Mini server is configured as per the instructions here (I think) but I still cannot get to my sight. Am I correct that I needed to forward my domain to the static IP? Is there a step that I'm missing?

Make sure you've got your Mac mini Server setup as the default host (sometimes set as DMZ) on your router, also ensure you've got something to handle DNS.

If you've got a domain through GoDaddy you can setup custom hosts (setup under Host Summary, for example NS1.OSX411.COM and NS2.OSX411.com both point to the server's IP 64.79.143.151) and set those as your nameservers. At that point enable DNS on your Mac mini Server and point everything to your static IP (see attached screenshot as a reference). Otherwise I'd recommend using a service like DynDNS.com who make it easy (just use their nameservers), I used them before I colocated the Mac mini Server running the site now.

It's also worth pointing out that DNS can take some time to propagate, I've had it take as long as a day before, so give it some time after you make major changes like add new host names. Also be careful when fooling around in the DNS settings, as a change to reverse DNS can break other things like LDAP and cause all sorts of unpleasantness.

Attached thumbnail(s)

  • Attached Image: Screen shot 2010-11-16 at 10.25.58 PM.png

This post has been edited by Robert Hodgen: 16 November 2010 - 10:26 PM
Reason for edit: Screenshot updated.

Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#6 User is offline   xphi1e 

  • New Member
  • Group: Members
  • Posts: 3
  • Joined: 16-November 10
  • Location:Sebring Florida

Posted 18 November 2010 - 07:09 PM

 Robert Hodgen, on 16 November 2010 - 05:59 PM, said:

Make sure you've got your Mac mini Server setup as the default host (sometimes set as DMZ) on your router, also ensure you've got something to handle DNS.

If you've got a domain through GoDaddy you can setup custom hosts (setup under Host Summary, for example NS1.OSX411.COM and NS2.OSX411.com both point to the server's IP 64.79.143.151) and set those as your nameservers. At that point enable DNS on your Mac mini Server and point everything to your static IP (see attached screenshot as a reference). Otherwise I'd recommend using a service like DynDNS.com who make it easy (just use their nameservers), I used them before I colocated the Mac mini Server running the site now.

It's also worth pointing out that DNS can take some time to propagate, I've had it take as long as a day before, so give it some time after you make major changes like add new host names. Also be careful when fooling around in the DNS settings, as a change to reverse DNS can break other things like LDAP and cause all sorts of unpleasantness.

Your article on Mac Mini Server Web Hosting is the only coherent thing I’ve read to date. Thanks for the photos too. They really help. Thanks for your help with this.

Q1: The GoDaddy site records NameServers Hostname as: NS57.DOMAINCONTROL.COM and NS58.DOMAINCONTROL.COM. Your example shows your host name with your domain name inserted instead of “DomainControl.” When I enter the Name server Host Name into the DNS section of my server should it say NS57.DOMAINCONTROL.COM or NS57.Paradigm4me.com (My Domain Name)?

Q2: At the GoDaddy site, under the Domain manager they show “A @ 64.202.189.170” this IP is listed 3 times. Is this IP to be entered into the server?

Q3: Just to be clear, the Domain name at GoDaddy must be forwarded to my Static IP, Right? (That's what I have done.)

Q4: Under Zones, the IP to the right of the web addresses (64.79.145.151) Is this to be my Static IP?
0

#7 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 19 November 2010 - 01:18 AM

 xphi1e, on 18 November 2010 - 07:09 PM, said:

Q1: The GoDaddy site records NameServers Hostname as: NS57.DOMAINCONTROL.COM and NS58.DOMAINCONTROL.COM. Your example shows your host name with your domain name inserted instead of “DomainControl.” When I enter the Name server Host Name into the DNS section of my server should it say NS57.DOMAINCONTROL.COM or NS57.Paradigm4me.com (My Domain Name)?

You want to use your new host name (for example NS1.OSX411.COM and NS2.OSX411.COM are what I use) as your nameservers. Just make sure you've got the host names set to your static IP.

 xphi1e, on 18 November 2010 - 07:09 PM, said:

Q2: At the GoDaddy site, under the Domain manager they show “A @ 64.202.189.170” this IP is listed 3 times. Is this IP to be entered into the server?

I've never used GoDaddy's DNS, I've always used my own servers or a third party like DynDNS. But make sure you've got at least an A record (machine) for to your static IP and a few CNAMEs (aliases) for stuff like www.mydomain.com to point to mydomain.com. Also the DNS server should list the nameservers, for example NS1.OSX411.COM and NS2.OSX411.COM are both listed and setup with A records, as well as a generic A record for OSX411.COM.

 xphi1e, on 18 November 2010 - 07:09 PM, said:

Q3: Just to be clear, the Domain name at GoDaddy must be forwarded to my Static IP, Right? (That's what I have done.)

In essence by setting the nameservers to point to your Mac mini Server you're delegating all DNS lookups to it. A third party like DynDNS can also handle those lookups if you don't want to run a DNS server on your mini.

 xphi1e, on 18 November 2010 - 07:09 PM, said:

Q4: Under Zones, the IP to the right of the web addresses (64.79.145.151) Is this to be my Static IP?

Yes, 64.79.143.151 is the IP address for my Mac mini Server, therefore all A records point to it. Use your static IP instead of mine of course.

A good check to see if the server is reachable is to use some terminal commands, like:

ping osx411.com
Should resolve the IP address, if it doesn't there are some DNS issues.

dig osx411.com any
Should list some info like nameservers, A records, etc.

dscacheutil -flushcache
Is a good way to empty your Mac's DNS cache, but your ISP may still cache the records. Again DNS propagation can take a while but you can configure TTL (time to live or expiration) for your DNS records.
Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#8 User is offline   JasonH 

  • First Member
  • Group: Moderators
  • Posts: 26
  • Joined: 18-February 10

Posted 19 November 2010 - 01:30 AM

 xphi1e, on 18 November 2010 - 07:09 PM, said:

Your article on Mac Mini Server Web Hosting is the only coherent thing I’ve read to date. Thanks for the photos too. They really help. Thanks for your help with this.

Q1: The GoDaddy site records NameServers Hostname as: NS57.DOMAINCONTROL.COM and NS58.DOMAINCONTROL.COM. Your example shows your host name with your domain name inserted instead of “DomainControl.” When I enter the Name server Host Name into the DNS section of my server should it say NS57.DOMAINCONTROL.COM or NS57.Paradigm4me.com (My Domain Name)?

Q2: At the GoDaddy site, under the Domain manager they show “A @ 64.202.189.170” this IP is listed 3 times. Is this IP to be entered into the server?

Q3: Just to be clear, the Domain name at GoDaddy must be forwarded to my Static IP, Right? (That's what I have done.)

Q4: Under Zones, the IP to the right of the web addresses (64.79.145.151) Is this to be my Static IP?


I use GoDaddy DNS, so I feel I can answer this.
A1: No, you do not want those domaincontrol.com name servers, those are the godaddy parked nameservers. In the godaddy control panel click on "Host Summary (add)" create two NS records that point to your IP. Then set your name servers to the two hosts you just created.

A2: No, that's because you have it set to parked name servers, ignore that.

A3: No, you do NOT want to be forwarding a URL to an IP.

A4: See Robert's answer.

Attached thumbnail(s)

  • Attached Image: godaddy settings.png

0

#9 Guest_brycep_*

  • Group: Guests

Posted 02 January 2011 - 01:46 AM

Hi,

I am trying to figure out about the public IP address that I got from my ISP and how it relates to my computer. How do I make this static IP address work for me? So far I can't see my websites on the internet yet. I know that the websites are up because I can see them on my local net. I have been trying to figure out nameservers from the discussion above and when I went to register my nameservers with godaddy I mistakenly used my computers local IP address. So now I am on a quest to get my static, public IP address to work. I assumed for a while that the static address was only for my router, but now I don't know.

I haven't seen any other literature yet that specifies how to make this all work. What I have been reading here about the Mac Mini server is brilliant and I suspect that you will be helping me very shortly. Thanks,

Bryce
0

#10 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 02 January 2011 - 03:14 PM

 brycep, on 02 January 2011 - 01:46 AM, said:

Hi,

I am trying to figure out about the public IP address that I got from my ISP and how it relates to my computer. How do I make this static IP address work for me? So far I can't see my websites on the internet yet. I know that the websites are up because I can see them on my local net. I have been trying to figure out nameservers from the discussion above and when I went to register my nameservers with godaddy I mistakenly used my computers local IP address. So now I am on a quest to get my static, public IP address to work. I assumed for a while that the static address was only for my router, but now I don't know.

I haven't seen any other literature yet that specifies how to make this all work. What I have been reading here about the Mac Mini server is brilliant and I suspect that you will be helping me very shortly. Thanks,

Bryce

Hi Bryce,

So it sounds like you've got a static IP, so long as you've got your router configured to redirect all traffic to your Mac mini Server via DMZ or a "Default Host" setting you should be set. Change the IP address in GoDaddy to reflect your external (static) IP and give it 24-48 hours to update. Make sure you've created two hosts like NS1.*** and NS2.*** to point to your external (static) IP and that those are set as your nameservers for the domain.

There really isn't much online to help people set up all this stuff, it has been more or less trial and error with me too.

I hope this thread is useful.
Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#11 User is offline   Nolan 

  • New Member
  • Group: Members
  • Posts: 2
  • Joined: 19-January 11
  • Twitter:@coheu

Posted 19 January 2011 - 07:17 AM

Thanks so much for writing this, I been looking for a week now on this exact topic.

I have made much progress!

This is where I am at and feel like I am not 100% sure on everything.

Bought the domain coheu.com with Eleven2.
MacMini server with IP - 81.83.15.157
Macmini is running DNS and WEB services.

COHEU.COM - editing the DNS to point A zone´s to the MacMini.
Setup nameservers on Eleven2 ns1.coheu.com and ns2.coheu.com to point to Macmini IP.

With this setup is this looking correctly, or am I missing something?

Thanks for the help!
0

#12 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 19 January 2011 - 03:37 PM

It doesn't look like your DNS server is returning any records for that domain. Make sure you've got the trailing period on coheu.com. and that all the proper ports are open.

A great site to check that everything is working is http://www.intodns.com/.
Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#13 User is offline   Nolan 

  • New Member
  • Group: Members
  • Posts: 2
  • Joined: 19-January 11
  • Twitter:@coheu

Posted 20 January 2011 - 04:00 AM

 Robert Hodgen, on 19 January 2011 - 03:37 PM, said:

It doesn't look like your DNS server is returning any records for that domain. Make sure you've got the trailing period on coheu.com. and that all the proper ports are open.

A great site to check that everything is working is http://www.intodns.com/.



Working on the DNS.

How can I verify the port issue? I know you mentioned port 80. But how can I verify if the ones I have are correct?

Thanks for helping!
0

#14 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 20 January 2011 - 09:43 AM

 Nolan, on 20 January 2011 - 04:00 AM, said:

How can I verify the port issue? I know you mentioned port 80. But how can I verify if the ones I have are correct?

DNS is going to use port 53, however OS X Server should be smart enough to tell you if the port is being blocked. I recently had an issue with DNS after the latest update (10.6.6) with DNS not working properly. Currently I'm using DynDNS for DNS instead of the Mac mini for this reason (I haven't heard of anyone else having this problem so I'm thinking it might be some glitch on my machine. I'd fix it but I'm real busy with other things at the moment.)

It doesn't look like your DNS server is responding, try the following in Terminal:

dig @81.83.15.157 coheu.com

That should return a list but instead says it cannot be reached. I've got the same problem at the moment with DNS on my Mac mini: dig @64.79.143.151 returns the same error. When I've got more time I'll look into the problem, but it started immediately after the 10.6.6 update.
Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#15 User is offline   DaneEveritt 

  • New Member
  • Group: Members
  • Posts: 1
  • Joined: 21-January 11

Posted 21 January 2011 - 02:01 PM

Im thinking about setting up a server at home to host my website from, and also to run my localhost setup.

So if I do this, can I still do localhost off the server? Also, what precautions should I take if I were to set this up at home, do I need a separate router?
0

#16 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 21 January 2011 - 02:10 PM

 DaneEveritt, on 21 January 2011 - 02:01 PM, said:

Im thinking about setting up a server at home to host my website from, and also to run my localhost setup.

So if I do this, can I still do localhost off the server? Also, what precautions should I take if I were to set this up at home, do I need a separate router?

Yes, you can still connect to it with "localhost" via a separate host with localhost as the alias.

As for routers etc. you can use your existing router. Just make sure the Mac mini has a internal static IP and that it's set to the DMZ or default host.
Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#17 Guest_andrew obrigewitsch_*

  • Group: Guests

Posted 25 January 2011 - 11:24 PM

I got a Mac OS X dedicated server on goDaddy.com, and I have some domain names registered on goDaddy.com under someone else's account. I have domain names A record set to my server's I/P address and the ns1.desibizbuy.com and ns2.desibizbuy.com. I have the DNS turned on with the Nameserver hostnames set to the named name servers.

I am trying to run a wordpress site, and for the life of me I can't get the site to work.

I got the mac Server because I am new to servers and thought since I use Macs normally it would be easier than Linex, however there is little to know user friendly documentation on these servers when it comes to hosting web sites, I plan on hosting several. The people at goDaddy.com don't really seam to know the first thing about them either.

Can someone help me to debug this and get my site working.
0

#18 User is offline   Robert Hodgen 

  • Administrator
  • View blog
  • Group: Administrators
  • Posts: 216
  • Joined: 18-February 10
  • Twitter:@roberthodgen
  • Location:Florida

Posted 26 January 2011 - 11:23 AM

 andrew obrigewitsch, on 25 January 2011 - 11:24 PM, said:

I got a Mac OS X dedicated server on goDaddy.com, and I have some domain names registered on goDaddy.com under someone else's account. I have domain names A record set to my server's I/P address and the ns1.desibizbuy.com and ns2.desibizbuy.com. I have the DNS turned on with the Nameserver hostnames set to the named name servers.

I am trying to run a wordpress site, and for the life of me I can't get the site to work.

I got the mac Server because I am new to servers and thought since I use Macs normally it would be easier than Linex, however there is little to know user friendly documentation on these servers when it comes to hosting web sites, I plan on hosting several. The people at goDaddy.com don't really seam to know the first thing about them either.

Can someone help me to debug this and get my site working.

First of all, Wordpress is going to require MySQL running as well as PHP which may not be enabled by default. You're also going to need to install Wordpress, for that I'd check out Wordpress' site.
Administrator and creator of OS X 411 and co-founder of The 411 Forums.
0

#19 Guest_Andrew obrigewitsch_*

  • Group: Guests

Posted 26 January 2011 - 01:27 PM

Ok, if figured out the first problem, it was a DNS problem, I have MySQL active.

What is the best way to create a new data base? As I can't find any database App on the server.


I did get the sites index.PHP to run and it asks for a database.
0

#20 Guest_Guest_*

  • Group: Guests

Posted 26 January 2011 - 04:07 PM

I loaded myPHP, so I am able to create databases, but I am stuck at creating the WP-config.php file. I create this file and then I just keep getting sent to a page that has what should be in the WP-config.php file like it can't see the file I made.

You you have any data on this or what I need to do to properly set up a MySQL database.

Thank you.
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3


Fast Reply

This post will need approval from a moderator before this post is shown.
  

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users