Mac Server Series: Enable The Web Server
Welcome to the site. Our most popular posts are a series of video tutorials on How To Use Your Mac As A Server. We also answer your Mac questions. Just Ask FMB Feel free subscribe to our RSS feed. Thanks for visiting!
In the first episode we looked at how to do the initial set up of your Mac as a server. Be sure to watch that video first.
In this episode, we’ll look at how to turn on personal web sharing so you can host a website from your machine. Also, we’ll look at the steps to have that website seen on the world wide web.
In this episode, I mentioned a few URL’s that may be of interest to the readers. Here are the Shownotes.
Macminicolo.net- The most popular and easiest way to host your Mac. Macminicolo.net offer very inexpensive colocation of your Mac. The service provides a very fast connection, a static ip address, and great customer service. (Patting myself on the back.)
Apache Server Info - Apple includes an install of Apache Web Server on all Mac OS X clients. This link will teach you more about the power that is Apache.
DynDNS.com - Helping those with a Dynamic (changing) IP address still be seen from the web, this service will give you a free hostname to use instead of your ip.
DynDNS Updater Client - helps you keep your most recent ip address on DynDNS.com
PortForward.com- The best way to host a website is with a machine that is hooked directly to the internet. But, if you are using a router on your local network there is still a way. You will need to use “port forwarding”. This site explains clearly how to do it with all kinds of routers. You’ll just want to forward port 80 to your machine.
WebMon an inexpensive but VERY powerful application to really get your Web Server working well. While the process in the video is free, this application is another way that may be worth the $15. We’ll likely look at this application in a future tutorial.
The video can be seen here
iEntry 10th Anniversary
Rumors
News
August 21st, 2006 at 1:44 pm
Hey, 2 things I wasn’t so clear about in the webcast:
1. Even with Dyndns, won’t the viewer need to open up a port on their cable/dsl router/firewall etc to allow access to the site?
2. For security purposes, shouldn’t we adjust the apache config file?
Also — what tool are you using to make the video cast?
Kind Regards,
Joe
August 21st, 2006 at 1:52 pm
Joe,
1) You’re right, I should have mentioned that this tutorial was written with the port forward in mind. I suppose I took it from the notion that if someone is using their Mac as a server, they already have access to it from teh outside world. But, just to be sure it’s clear to everyone, port 80 should indeed be forwarded to the machine. For more on your router you can visit http://www.portforward.com/routers.htm .
2) What kind of adjustments are you looking for?
I used Snapz Pro X for this video, but I think I’ll find another alternative for the next one. Their current version is still now Universal Binary and takes for…ev…er to encode. Stick around because I’ll be writing a post about videocast software in the next couple days.
August 21st, 2006 at 3:12 pm
My ISP (Cox Communications) currently blocks port 80. I’d like to set up another port like 8080, but I don’t know how to get Apache to listen to that port. How do I change those configuration settings?
August 21st, 2006 at 3:18 pm
Hi Jason, you’ll need to edit your Apache configuration file so it will “Listen” on port 8080. Here is a tutorial on switching Apache ports. Leave more comments below if you have other questions.
August 21st, 2006 at 5:53 pm
Brian,
Just looking for the basics on tuning the Apache configuration file for the most secure implementation. Also, what if you want to add a mysql database, php, or stuff like that.
I am a security guy, but really haven’t worked with web servers or mail servers all that much. I am thinking about getting a mini to play with the technology.
Thanks for all you help!
August 22nd, 2006 at 6:40 am
Hey!
This series is a great idea. I have been playing with NAS in my network but this is so much better.
One remark though: I’ve setup a simple test page on my new mini, and after installing the DynDNS daemon I was able to see that by using the homedns.org account I set up. That was with the interface set to default however, and after changing that to external all I get is my router’s admin page. Now, whatever setting I use, all I can see is my router, not the test site.
Personal webserver is on, portforwarding is set correctly, I can see the page through the link in Sysprefs. Any idea what could cause this?
August 22nd, 2006 at 7:58 am
Little update: tried changing Apaches port tot 8080 as per the link above - no dice, same problem
August 22nd, 2006 at 12:43 pm
hi, i am utilizing both your videos and some articles to create my server. so far everything is working fine from inside my network. the name i created at dyndns works fine for me, as well as my external ip, and my internal ip. all take me to my site. but when i have my friends test it from their homes, obviously outisde my network, they never can get to it. i dont understand, its confusing to me that i can access the site via my external ip and my friends cant….
thank you for any help
p.s. i am using airport(its a macbook) i have opt. online for my isp, and my router is a dl-524
i also have port 80 forwarded to my macbook inside my router
August 22nd, 2006 at 2:43 pm
Great second video. Very easy to follow, and excellent explainations. I would like to comment that in your first video you tell everyone to swap the background to a solid color. But we find the second video with the stnadard os-x background…
just a thought…
shane
August 23rd, 2006 at 3:30 pm
I work at a non-profit that has two offices about 10 miles apart where we would like to securely share address books, documents, spreadsheets and perhaps a filemaker database.
Will this series be covering how to do such, or am I in over my head in attempting such a feat? I’ve had several queries in various forums over the last year with no luck. If I’m dreaming here, any ideas on a low cost, easy to maintain means of achieving our goal? Thanks!
August 23rd, 2006 at 4:15 pm
Great series but I couldn’t get mine to work. I can see the site OK on the host machine, but the other computers on my network can’t. This is over Aiport. Any ideas? Can’t wait for the next one.
August 24th, 2006 at 2:20 am
More updates: changed the static IP of the server, and dis- and re-enabled Apache (back on port 80) over a reboot. Now the Macs and PCs in my LAN can see the site, but outside machines (still) can’t.
August 25th, 2006 at 4:34 am
In the first video tutorial you mentioned things about power savings and that neat little “restart on power faillure” setting.
AFAIK you still must tell you Mac to restart that DynDNS demon on restart, otherwise you’re ip won’t be updated anymore.
August 29th, 2006 at 5:48 am
[...] It seems that my RSS feed reading is not a complete waste of time after all. About two weeks ago, I discovered a cool tutorial for using Macs as servers on freemacblog.com. It starts with the very basics and is intended for the average Joe who doesn’t have a computer science degree. It shows you step-by-step everything you need to know. As of now, I can serve a webpage from my iBook to my Mini or vice versa, but I need to set up port forwarding on my router before I can share the websites on my computers with the rest of the world. Sadly, my router’s software seems to be Korean only, so I’ll probably need to ask a teacher at the school to help me with that. I’ll run a few tests using a direct connection (without the router), but I still need to figure out port forwarding to make course management software truly usable and useful in the settings I have in mind. [...]
August 31st, 2006 at 12:49 am
hey i have the same problem , machines inside my network see the site fine with my external ip and the hostname provided by dyndns, but machines outside the network cant find it ,,, any suggestions ,
all port forwarding has been done and steps followed correctly :S
September 3rd, 2006 at 2:02 pm
Great series, still learning form it even though I’m using my own mac mini as a server for a while. I use it for web and mail services. I’ve documented my setup, maybe others can use that as well for their setup if you want to do more with your mini. Have a look at http://switch.richard5.net/isp-in-a-box-v2/
Will keep watching this series…
September 7th, 2006 at 11:30 am
Thanks for putting together this series. Very informative. Just a suggestion — how about a tutorial on setting up Sendmail and Bind / DNS on Mac OS X?
September 13th, 2006 at 11:46 am
Nice tutorial Brian! What software did you use to create the tutorial?
Thanks!
Sterling
September 16th, 2006 at 12:01 pm
I’m having the same problem that AJvK has. It shows my router admin page, and ye the ip is set to external. Anybody found a solution?
October 25th, 2006 at 5:48 pm
I have a macbook 13″ and when I try to run dyndns updater, it just starts up a little then quits. Same with the widget. Any Suggestions?
October 28th, 2006 at 2:12 pm
First, fantastic tutorials, wonderfully done. Thank you.
Secondly a problem. I have spent over 12 hrs, tried everything or my ISP could think of… When I enter my website name in my browser, all I get is my DSL modem config page?, people outside get nothing. I can see my index.html from my LAN but not throught the WAN. My setup is DSL to Speedstream 5200 modem to ethernet cable to Airport Extreme Base Station (set DCHP gets addresses from the Speedstream which acts as DCHP serve) to my MacBook Pro laptop via an Airport network. But if I directly connect the laptop to the Speedstream via ethernet and connect that way the SAME thing happens. I get the Speedstream config page. The Speedstream is setup to act as host by default and has an internal index.html page which is the config page for the modem? Any help would be appreciated noone else seems to know where to go from here.
December 3rd, 2006 at 1:38 am
i’ve set up my mac according to the first two tutorials. I’ve created a dyndns account. I’ve downloaded the dyndns updater. i’ve set my router to forward port 80 to my Mac. i type in the url for my site and i get this box that says, “To view this page, you need to log in to area “” on berokey.dyndns.org.” thsi box has data fields for a “Name & Password,” but as many things as i can think of to type in these fields, i can not get it to accept them. what have i done wrong?
December 29th, 2006 at 11:41 am
Hi,
Thanks you so much for the series, it has been very helpful for a beginner like me. I like to mention a few things however. For one, like a poster stated before, it will be helpful to mention about enabling the ports on the router for the appropriate service. I beleive alot of newbies would not think of that.
The other thing I think is worth mentioning is to modify the permission on the html pages in order for them to be viewed on the web. I for one, didn’t think of that, took me quite a while and quite a few hair to figure that out the Forbiding message. My be it was me, but things like that are not obvious to anyone new. Unless, if you are the owner of hair club for men, you may not want to mention it at all.
Thanks again Brian for your work.
Richard.
April 11th, 2007 at 4:15 pm
Hi,
Your series is awesome!
HOWEVER I have a question.
I went to yahoo.com and paid my 9.99 and registered a domain name http://www.sleepybunnyzzz.com
I used iWeb to create my website and publish it to my “sites” folder.
I have a static IP address.
I set up my macs settings just like you showed in the first video.
I want to leave my mac on all day long and dedicate it to just hosting my website.
I want to somehow get the site thats in my “sites” folder to be what people see when they use safari to go to http://www.sleepybunnyzzz.com
How do I do that?
April 13th, 2007 at 12:05 pm
never mind I figured it out.
Its actually pretty simple.
Part#1 (Make your website and set up your macs settings.)
1. make your website using iWeb or any other html program.
2. go to your harddrive/(username)/Sites
3. delete the “index.html” that is already in that folder.
4. drag the index.html and the folder that you made with iWeb into the Sites folder so that the only things in the sites folder are the “index.html” and the folder with the stuff that iWeb made.
5. go to “system preferences”
6. open “sharing”
7. click “Personal web sharing”
8. click on the link to “personal website” so that it opens in a web browser.
9. Copy the link from the browser.
Part#2 (set up remote login)
1. (make sure you configure it to allow remote login but I don’t know how to do that yet.)
Part#3 (configure your website to point to your computer.)
1. register your domain name with yahoo.com small business.
2. http://smallbusiness.yahoo.com/
3. click sign in
-do your login and password
4. click “domain control panel”
5. click manage advanced DNS Settings
6. Click manage your domain forward
7. click “create forward”
8. click “Deactivate Starter Web Page”
9. paste in the link that you copied in “Part#1 step#9″ (deleting the http:// because thats already there.)
10. click “continue”
11. click “masked forward”
12. click “submit”
13. click “return to domain forwarding”
14. click “edit”
15. click “continue”
16. click “masked forward”
17. click “submit”
18. click “I want to include the following keywords to enable search engine ranking”
19. click “submit”
20. click “Return to the Forward Domain Page”
21. Quit the browser.
Part#4 (Get Yahoo to recognize your site in searches)
1. go to http://www.yahoo.com
2. scroll to the bottom and click “suggest a site”
3. click “submit your site for free”
4. enter your website for example “http://www.mygreatsite.com”
5. click submit url
(wait up to 2 weeks for this free service to take affect)
part#5 (Get Google to recognize your site in searches)
1. go to http://www.google.com
2. click “about google”
3. click “submit your content to google”
4. click “add your url to google’s index”
5. enter your URL your comments and the squiggly letters
6. click “add url”
(wait up to 2 weeks.)
May 15th, 2007 at 12:25 pm
Great tutorial. Quick question from a newbie.
I’ve followed all the instrutions, including portforwarding, but now I’m at a loss as to what to do.
My company is trying to get a web server to host some files for access while at home. We are on a router so I’ve successfully done the Port Forward step too.
Do I use iPage to create the page and then host it as per the tutorial, or does being on a router and going through Port Forwarding make the steps different. Will I have to save to a different directory or put a my DynDNS domain somewhere? It seems as if it should change things, but I’m not sure where to go if that is true.
Help please!
Don.
June 25th, 2007 at 9:16 am
I have the same problem as (seemingly many others). Following all the steps above, when I visit my domain name I am presented with the logon for my router. I have in addition tried the external ip:port, and pinging external ip:port. I get “cannot resolve mysite.com:8080: Unknown host”. Is it some problem with the routers not forwarding ports correctly? Also won’t routers that have configurations of port 80 be inaccable if you ask it to forward that port to another computer? Perhaps only routers with non standard configuration ports can actually forward ports 80?!?
I banging my head against the screen (as I feel many others are) but nobody’s talking… any assistance or ideas appreciated.
Nathan
September 1st, 2007 at 11:21 am
AMAZING!!! So using 2 websites on how to get your mac hosting a personal website for free, having it accessible to the outer world-wide-web, and getting it seen on the top searchengines out there, and is all for free is what I would say is what most people with a PC or Laptop have wanted to do since purchasing a mac, because I know I have. Also, with Adsense by Google a free hosted site could actually start generating revenue just by having what people want to click on in terms of displayed advertising. The most difficult part I think is having interesting content. I am simply AMAZED!
L
September 7th, 2007 at 8:05 am
Great Tutorial!
Mad Props!!!
I have one problem though.
My ISP blocks port 80.
I read the tutorial and did everything but there is no visible or invisible file by the name of /private/ect/httpd/httpd.conf.
“No Such File or Directory”
Any Advise?
September 7th, 2007 at 1:37 pm
Found the file.
I just can’t save the new port # (8080)
I open up a terminal window and type..
ls -l /private/etc/httpd/httpd.conf
it comes back with..
-rw-rw-rw- 1 root wheel 38334 Jan 13 2006 /private/etc/httpd/httpd.conf
new-host-4:~ David$
Then I type…
sudo chmod 666 /private/etc/httpd/httpd.conf
I then find the file, open it in text edit and change port 80 to port 8080 but
when I try and save it, it says “couldn’t save” without an explanation.
Does anyone know what I am doing wrong?
September 9th, 2007 at 3:04 pm
UPDATE
Figured it out.
I had to save the file to my desktop then move it to the folder and authenticate it when prompted.
Also, for some reason that is beyond me, Apache was refusing connections on port 8080.
I change everything in my firewall settings to port 443 and my website is up and running.
Now I look foward to building it up.
October 21st, 2007 at 5:27 pm
Hi
Great series. Inspired me to finally go out an buy a mac mini to use as a server!
For anybody who is having trouble with port forwarding … if you keep getting your routers admin page after you have setup the port forwarding it probably means your router does not support NAT Loopback. Basically it means if you are trying to access your webserver using your external IP address from a machine on the same network, its trying to loop back on itself and your router cant handle it. If you try the same thing from an external machine (ie not on the same network) you will find that it actually works fine.
To access the webserver from a network on the same network, simply use the local IP address.
Hope that helps
Thanks
June 1st, 2008 at 1:16 pm
Just wanted to update my comment nr. 16, There is a newer better site with all the content to create your Mac server mini. It’s called http://diymacserver.com !
September 28th, 2008 at 9:02 pm
exelente los felicito por su trabajo profesinal, su exelente diccion del ingles la calidad de sus lecciones que Dios los bendiga Jorge
January 1st, 2009 at 4:12 pm
Whenever I try to go to my IP address that dynDNS gave me, it asks me for a username and password, and I don’t know what to put in. I tried my dynDNS usename and password but it dosen’t accept it.