How to/Tutorial for setting up Lion Server to host a small website?

Discussion in 'Mac OS X Server, Xserve, and Networking' started by Games4U, Nov 2, 2011.

  1. Games4U macrumors newbie

    Nov 2, 2011
    Hey, I just installed Lion Server on my Macbook Pro and want to set it up to play around with hosting my own personal website. Nothing big right now, just want to start learning and I am having a little trouble.

    I bought a domain name from, I went into the Zone File Manager/DNS Manager and set the A-Name to my outside IP Address, set up my router to portforward to port 80 for the website (I read that I had to somewhere)

    Got iWeb installed and created a small little website. A few pics, some info and whatnot. Published it to my hard Drive and pointed the site in the Server app to that folder.

    When I type the url in my browser, it pops up, but when I type in in from my phone, or have my sister type it in her browser (a ip address that isn't on the network;she lives in another state) we get nothing. Can someone help me out, I've been trying to look for tutorials, and everyone on forums say it's super easy, but never gives me details on how to do it, they just say "it's easy, good luck"

    Can anyone help me out and point me in the right direction? I am kinda stuck and have a few years of IT experience but not with server stuff and want to start having some fun.
  2. mainstay macrumors 6502


    Feb 14, 2011
    can you connect to the website using just your external IP (i.e., don't use the domain name at this point)?

  3. rwwest7 macrumors regular

    Sep 24, 2011
    If your sister pings your website by name does it resolve to your external IP? If so than the problem is in your house. If not than it's a DNS issue at go daddy.
  4. jtara macrumors 65816

    Mar 23, 2009
    Don't do this. Go to a commercial web host. If you just want to fiddle, sure go ahead and set up a webserver on your Lion server and use it locally. If you want to fiddle, and want the result on the public Internet, get a cheap VPS.

    If you really insist: it's going to suck for your users, because you almost certainly have limited outbound bandwidth from your ISP. They also likely prohibit this usage of their service, and you could get in trouble if they find out. It's also likely that they just block port 80 inbound.

    If your ISP DOES allow it (unlikely) and they DON'T block port 80 (unlikely) you still have to deal with the fact that you probably have a dynamic IP address. You'll need to set-up forwarding with a service like Not a big deal, and you can do it for free, but the result is still going to suck.

    You will also have to set-up your router to do "port forwarding" of port 80 to your server.

    Web hosts belong in a data center. Period.
  5. rwwest7 macrumors regular

    Sep 24, 2011
    I think he's just trying to learn, not compete with GoDaddy is very cheap and what I use but I would say learn first then pay.
  6. Alrescha macrumors 68020

    Jan 1, 2008
    You do realize that is not how the Internet was designed nor how it worked not so long ago. People ran their own hosts, with their own web servers, mail servers, etc. Many people still do – though ISPs like to make this difficult in these modern times.

  7. jtara macrumors 65816

    Mar 23, 2009
    It's irrelevant what was envisioned at design. I know how it was designed. I was an Internet user before it was called the Internet. (ARPANet).

    It's relevant what the state of affairs is today. One can be nostalgic or one can move on.

    Yes, the concept of the web, as well, was that everybody would host their own web server. That's how the "home page" got it's name.

    The fact is, most home Internet connections aren't suitable for hosting a web server, nor is it usually contractually allowed by the provider. Home bandwidth is typically asymmetrical, with higher bandwidth in the WRONG direction for hosting a server.

    Even for companies, an in-house Internet connection rarely makes sense.

    I worked for Sony for a couple of years. Their west-coast data center for gaming servers was downstairs from my cube. This was only possible because they're on a fibre "ring" in the northern part of San Diego. There's an ISP next door, another one down the street, etc. So, they can approach data-center connectivity because they are in a unique physical location.

    Still, while I was there they moved much of their hosting to an off-site "cloud" service.

    Since the OP already dealt with port-forwarding, and it appears he may have a static address, the issue is probably ISP port 80 blocking. Try setting-up the server on a different port. If it's just going to be a few friends accessing the site, that probably fits within the terms of service for their ISP. Generally, it's OK to host a site for demo or private purposes, but check the rules to be sure. It could still kick you into a "business" plan if they find out.
  8. Alrescha, Nov 3, 2011
    Last edited: Nov 3, 2011

    Alrescha macrumors 68020

    Jan 1, 2008
    It's true that most home bandwidth is asymmetrical. It's unimportant. Most people have upstream bandwidth that exceeds that of whole universities back in the early days of the World Wide Web. It's far more than that needed for 99.9% of personal web servers.

    ISPs restrict such services because of their fear of the unknown. It's purely artificial and completely unnecessary (and because of people like you who make ridiculous statements like "Web hosts belong in a data center. Period.".

  9. jtara macrumors 65816

    Mar 23, 2009
    But this isn't the early days. This is now.

    The typical home high-speed Internet connection will comfortably support ... well, comfortably? It will support 0 inbound web users. We all expect our pages to come up instantly. At typical 1mbit/sec uplink speeds, you turn a desktop browsing experience into a mobile browsing experience. Or an Internet Cafe in a third-world country browsing experience.

    No, they do it because there are real costs involved. At least in the U.S., consumers demand a fixed-price service, with no usage-based pricing component. The acceptable price model for home use is bandwidth tiers with "unlimited" usage. As a practical matter, though, they have to restrict usage. The price is way too low to support the maximum bandwidth 24/7.

    So, let's say for purposes of argument that a 1mbit/sec uplink is acceptable performance-wise. I would argue that it isn't, but let's just say it is. Your ISP can't afford to let you use that 1mbit/sec uplink at full rate 24/7. But you (the public) have demanded fixed pricing, so they have no way to charge you for the usage. The only way they can cope is to restrict usage by policy.

    Most ISPs (except that that are strictly consumer-oriented) do offer "business" class service, with symmetrical bandwidth. The price of such service is typically much higher than for consumer service, and may even include a usage-based pricing component.

    It's not "fear of the unknown" that drives these policies, but consumer demand for fixed pricing and the real costs involved.

    The cheapest place to consume bandwidth - if you are actually paying for it using a realistic pricing model - is in a data center. Compare pricing and both burst and aggregate bandwidth availability between a business-class office (or home) Internet connection and hosting in a data center. The data center is cheaper.
  10. Alrescha, Nov 4, 2011
    Last edited: Nov 5, 2011

    Alrescha macrumors 68020

    Jan 1, 2008
    Of course it is. What part of "personal web server" do you not understand? Whatever bandwidth folks might need for their friends and family they are already using today in the form of emailing their pictures and whatnot.

    A megabit? 24/7? Again: What part of "personal web server" do you just not get?

    (who is obviously beating a dead horse)*

    * I'll make an edit, then I'm done here.

    A reality check:

    For the better part of the past decade, the startup company I worked for ran their entire corporate offices from behind a single T1 line. That's 1.54 Mb/sec, symmetrical. That included the demo site (web servers, application servers, etc.). It worked fine. The application was a near real-time streaming service. 1.54 Mb/sec. The *current* demo site runs behind a dedicated cable modem connection with a ~1 Mb/sec upstream. It works just fine.

    I currently run Snow Leopard Server on a connection with a 1 Mb/sec upstream. That's web server, wiki server, calendar server, mail server, chat server, etc. It's only visible to friends and family, and it also works fine. I use the same connection for Back To My Mac.

    The point is twofold:

    The bandwidth needs of your average person who wants to run a web server are tiny. Insignificant.

    ISPs have nothing to fear but fear itself. Sure, there will be some folks who abuse the service, and they can be handled individually.

    This mindset of 'web hosts must be in a colo' is without merit, and only serves to extract more money from folks who have the resources right at home to do the same thing - without causing any harm to their ISP.

  11. rwwest7 macrumors regular

    Sep 24, 2011
    ISPs don't want people running professional websites from home. The key word being "professional" and high traffic. I guarantee you they don't give two stinky tirds if someone wants to set something up for personal use that runs out of their home connection. If they do then I'd move on to another provider.

    For years people have been doing Torrents which generate waaaaaay more traffic than any personal website will.
  12. jtara macrumors 65816

    Mar 23, 2009
    I agree 100%.

    I'm just explaining WHY ISPs have the restrictions that they do. It's NOT "fear of the unknown."

    I provided the OP with a likely solution: run his personal website on a port other than port 80. I suspect that his ISP is blocking port 80 inbound, and there's nothing he can do about it.

    He can set-up his site on a port other than port 80. Users will have to add the port number to the URL. Obviously, this would not be acceptable for a commercial site, and that's exactly why ISPs do that.

    BTW, he did say "nothing big RIGHT NOW." Sounds like he hope to run a "real" website in the future. If he wants to fiddle and learn, I'd suggest that at some point he start doing that in the environment in which he will have to operate when/if he has something that will draw significant traffic.
  13. altecXP macrumors 65816

    Aug 3, 2009
    That IS how it is today.

    I know quite a few people that run 5000+users websites with forums, chartroom and messaging including full profile pages and image hosting on computers in their house, and they are not rich by any means. They even have great stability

    Heck one of them just had a chat outage because "sorry had family over someone tripped on a cable"

    For a long time when Digg was invented it lived in Kevin Rose's living room.
  14. 7031 macrumors 6502


    Apr 6, 2007
    As others have stated, if you are unable to access the site via its IP address from outside your connection, it is probable that your ISP blocks inbound port 80 connections.

    Could you post your IP address? It would likely help us work out what is going wrong.

    Also keep in mind that if you are hosting your website from home, whenever your Macbook is in sleep mode or turned off, your site will be inaccessible.

    I actually wouldn't be too worried about bandwidth - for example, I have a 50Mbps connection, with a 5Mbps upload, which is plenty for hosting from home. Most ADSL users will have around a 1Mbps upload, which is fine for a small website (although page loads may get a bit long especially if its image/video heavy).

    This sums it up quite nicely. Before I got a cable connection, I had no issues at all hosting a small loops site from home. It was a tad slow, (and eventually I moved it to hosting elsewhere), but it worked just fine. Especially small sites just for friends and family, a home connection is fine. I just wouldn't reccommend using a Macbook for hosting it, especially as laptops generally won't be on 24/7 (I mean, don't people move around with them anymore? :p).

    Hmm yes. I'd be a bit worried about having 5000 users on a home connection (assuming they're active), but I'd say CPU is probably more likely to be a bottleneck than bandwidth, so yeah, as long as you have a suitable server it'll be fine.

    Of course, if you have a spare computer that you're not using, that would work great for hosting as long as you're OK with keeping it on 24/7. Having said that, the electricity usage might be a tad much, in which case you're probably better off just using a paid website hosting plan.

    Having said this, I would still recommend paying for website hosting if you can afford it. It's generally very cheap from most companies, but its worth getting a few reviews etc first so you can go with a reputable company. I know you have your domain name with GoDaddy, but from what I've heard their web hosting isn't exactly the best in the world.
  15. jtara macrumors 65816

    Mar 23, 2009
    As an example, in San Diego, Tier 3 electricity costs 31 cents/kWh. We have tiered electricity prices that range from 14 cents Tier 1 to 33 cents Tier 4 and I'd guess that most households with a tech-oriented owner are going to fall in Tier 3...

    A desktop computer might typically draw 200 watts, so 200 x 24 = 4,800 watt-hours, or 4.8 kWh/day x 30 = 4.8*30= 144 kWH/month.

    BTW, Tier 1 is only the first 291 kWH, so you can see that running a server full-time is almost certainly going to kick you up to Tier 2. Tier 2 ks 291 to 378 kWH, so if you're in Tier 2 now, this will certainly kick you up from Tier 2 (17 cents) to Tier 3 (31 cents). Yes, that Tier 2-3 jump is steep!

    At Tier 3, the incremental cost of that server is $44/month.

    Maybe you just want to host in a data center. ;)
  16. ANiSO macrumors newbie

    Mar 1, 2012
    What is more secure?

    I am in the process of putting together a forum for my family's farm. My uncle tells me that i can do this so long as only people on the farm have access to it. this leaves me in a quandary. what is more secure? hosting my own website or going to something like go daddy? i recently upgraded my router and internet connection to something around 50mb/s. i know, ridiculous. i play mmo's, competitive fps, and use my internet connection for other various reasons. I know that i have the speed and capacity to host my own site. but im curious as to what you obviously knowledgeable people would advise. i have a core duo mac book, 2.4ghz processor, sitting around and am considering getting lion to run this site.
  17. Consultant macrumors G5


    Jun 27, 2007
    1. don't use godaddy.
    2. your download speed of "50mb/s" is NOT the same as your upload bandwidth.
    3. you don't need lion to run a web site

    You can install something like wordpress and only let account users access the site.
  18. MacOverWin macrumors newbie

    Nov 24, 2009
    If you really want to learn, get a mac mini and configure that to be a web server, email server, etc.

    Host it out of a Data Center like someone mentioned and you won't run into local ISP issues.
  19. jackhdev macrumors 6502

    Apr 9, 2011
    Bismarck, North Dakota
    Oh god, these people. I'm going to be an Apple Certified System Administrator in a week and I would never use a data center unless I required huge amounts of bandwidth, cooling, etc. In other words, a service that supports many people downloading video simultaneously. I'm supporting all of my iOS apps, mail, MySQL databases, contacts, calendar, OD, websites, files, and VPN on a 27" iMac running Snow Leopard Server in my office. If you're ever looking to set money on fire for no reason... go data centers!!

    If your ISP is blocking port 80, try hosting your site temporarily on another, higher up port (above 1000) and then try to access your IP address in a web browser (e.g. http://IPAddress:8080).

    Additionally, try testing to see if your ISP allows inbound requests over port 80 by going to Another popular port to block is port 25, used for mail.


    What's the problem? If someone wants to figure out how to host something, I will do nothing but encourage them. Hosting your own website from your house (or wherever) is something really cool to try out. I knew nothing about IT a year ago (had no idea what DNS was, ports, "static" IP addresses) and it took me days to figure out how to put a website up. Next week I will be an Apple Certified System Administrator. Why not have more patience?
  20. jtara macrumors 65816

    Mar 23, 2009
    As I pointed-out above, depending on where you live, hosting in a data center can cost considerably LESS than doing your own hosting, because the cost of hosting in a datacenter can actually be less than the cost of local electricity.

    If you are using an already-existing and powered server, and have decent symetrical bandwidth (which most home users DO NOT HAVE, vs. what you likely have in your office) and you are already paying for that symetrical bandwidth - then it can make sense to host in-house.

    Regular web hosting accounts are practially free. You can get decent-sized VPS for less than the cost of the electricity to run your own server, let alone the capital expense and maintainence. A VPS will likely meet the needs to most of those here, even with many multiple websites, and will provide superior performance due to the available burst bandwidth.

    Hosting onsite is massively expensive vs. the alternatives available today. Datacenters gain the efficiency of being located where there is cheap electricity and overall economy of scale.
  21. jackhdev macrumors 6502

    Apr 9, 2011
    Bismarck, North Dakota
    The electricity part is somewhat true... but in my building everyone pays a certain percentage of the total bill according to how much space your office takes up, employees, etc. There are no individual meters, so even if I started using a lot more energy, my bill would barely raise.

    Though if you leave your computer on all the time anyway, would running a web server raise your computer's energy usage by a significant amount?

    The Internet part isn't really true. I had to pay an extra $15 to get ports 80 and 25 opened, but I have decent upload speeds and the average upload speed per house is definitely sufficient to run a website on.
  22. imbm24 macrumors newbie

    Nov 17, 2012
    Still no answer

    I see a lot of debate of whether it is wise or not, but I did not see any answer to the question. The question was how does somebody do this, not is it cost effective to do or should I rent time on a hosting service.

    I found this thread since I am also looking for an answer. I want to share out some information, mainly just to myself and a couple of friends, that is many GB and when you get to this level of data the cost to rent goes up a lot. I already have the data on my MacMini Server. I just want to set a page to have access when I want it.

    How do I set my Server?

    How do I transfer my domain name from to my Server?

    How do I get my domain set to be seen from outside my own network?

    What other questions I don't know yet. If you know answers to questions that I have not yet gotten to, it would be great if you could answer them also.
  23. jomobco, Apr 1, 2013
    Last edited: Apr 7, 2013

    jomobco macrumors newbie

    Mar 21, 2013
    I've read that you need to let applications>server>services>websites>"+" create your website folder. I've got multiple websites created by adding them through the server app which work fine. I have Godaddy point the A record to my static DNS address. Make sure you have an index.html file in your domain folder located on your hard drive so that it knows what your home page is. It will create a folder in your HD called "website" which contains your domain folders. A new folder should be created through each domain you add.
  24. LongSticks macrumors 6502

    Jul 22, 2012
    Kent, UK

    Have you had a look at this as a source of info! This is part one and I know at part 18 he is talking about web server!

    I have found YouTube invaluable in starting out with complex software, like Civil3d.

    I know nothing about servers, but I find it help's me to watch someone do what they are telling you....good luck

Share This Page