Hosting sites on my my mac

Discussion in 'Mac Basics and Help' started by wmmk, Apr 14, 2006.

  1. wmmk macrumors 68020

    wmmk

    Joined:
    Mar 28, 2006
    Location:
    The Library.
    #1
    Hi, all!
    I've just installed and registered for service with no-ip.com "the dynamic dns leader" and moved my website to the "sites" folder in my home directory. I've fired up apache, and I have no idea of wht to do from here. I want machine to be safe, usable as my everyday machine, and I want to host my own website for FREE!
    What do I do?
    Thanks a billion! :D:):D:):D:):D:):D:)
     
  2. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #2
    Well, I'm partial to DynDNS, but the advice is the same as to how to set up Apache.

    First, go into System Preferences...->Sharing and turn on "Personal Web Sharing". That'll open up port 80 in the firewall (you do have your firewall turned on, right?).

    Next, go to System Preferences...->Network, select your network interface (hopefully, Built-in Ethernet, but Airport will work fine) and choose the TCP/IP tab and set it to "Using DHCP with manual address" and enter in an address - the current one will be fine, you just want to make sure your Mac is always at the same internal IP.

    Next, make sure you've set up your router to forward port 80 to your Mac's address.

    By default, access to your Mac will use /Library/WebServer/Documents/index.html, so change the /Library/WebServer/Documents folder to serve your pages, and you should be fine. A lot of people have had issues using the Sites folder for external access, but some haven't, so maybe that'll work for you. It all depends on how Apache is set up.

    A little digging into Apache docs will let you do all kinds of things - use ports other than 80, use folders other than /Library/WebServer/Documents, link to external drives, check access logs, etc.

    But this should get you started.
     
  3. wmmk thread starter macrumors 68020

    wmmk

    Joined:
    Mar 28, 2006
    Location:
    The Library.
    #3
    Two things:
    1. When I try to manually connect with DHCP and type in the IP address used when DHCP is set to connect automatically, I am no longer connected to the net. Network Diagnostics fixes that, but switches me back to automatically connecting.
    2. How I make sure I've set up my router to forward port 80 to my Mac's address?
    Thanks! (everything up until changing DHCP worked amazingly!

    Edit: Suddenly, manually connecting with DHCP works! Cool!
     
  4. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #4
    One thing to check into is the possibility that another computer on your net has "taken" the IP address that you want via DHCP, so it isn't actually available for use by your Mac, but I see now that it's working for you, so all should be well. Personally, on a home network, I tend to use manual addresses just so I can be sure which systems are where for port forwarding, etc.
    Depends on your router. For example, on my Linksys, there's an "Applications and Gaming" tab, and, under that, a "Port Range Forwarding" tab in which I can forward port 80 to the IP address of my server. I'm sure there's something similar on yours... you just need to know how to log onto it, typically at some place like 192.168.xx.1.
     
  5. wmmk thread starter macrumors 68020

    wmmk

    Joined:
    Mar 28, 2006
    Location:
    The Library.
    #5
    Everything so far has helped a ton, (thanks, jsw) but I still have a few questions about serving my own site:

    Does anybody know how to forward port 80 on a Belkin router?

    Where can I get a free domain name (obcure endings like xxxxx.xyz are fine, all I care about is everything being free obscure is even better, because I don't want traffic from random people who will just eat up my intenernet conection's bandwidth)

    Does my computer have to be turned on to serve up webpages? (it's in my room, so even though it's pretty quiet, I'd hate to always hear that litte whurr and be jacking up electricity bill)

    What do I do once I have a domain name, am using no-ip.com to make my dynamic external IP adress static, Apache is fired up, I'm forwarding port 80 on the router, and my site is in the correct location?

    THANKS A BUNCH, EVERYBODY HELPING ME HERE IS SAVING ME THE $99 THAT I'D SPEN ON .mac, SO I OWE YOU, CHECK OUT MY THREAD OUT THATS ALL ABOUT FREE ALTERNATIVES TO CS2 AND APPLE PRO SOFTWARE AND DREAMWEAVER AND ALL KINDS OF OTHER STUFF:

    http://forums.macrumors.com/showthread.php?t=192562

    thanks!
     
  6. zweigand macrumors 6502a

    zweigand

    Joined:
    Oct 19, 2003
    #6
    Your URL should be the one with no-ip in it. I don't use No-IP, I use DynDNS.org ..but in that case your URL is whatever you picked from the list. (i.e. somename.gotdns.com)

    If you leave your site in your users > username > sites folder your url would be something like yourname.no-ip.com/~username/

    I suggest you put your files in the main library (Library > WebServer > Documents) to shorten the URL ...if you put them there your address would be yourname.no-ip.com/ ..no need to throw the /~username/ onto the end
     
  7. wmmk thread starter macrumors 68020

    wmmk

    Joined:
    Mar 28, 2006
    Location:
    The Library.
    #7
    Ok, my domain is:
    http://theliberalmac.servehttp.com/
    no-ip.com for mac os x update client is running
    apache is running
    port 80 is NOT yet being forwarded (somebody with a belkin, please help!)

    what do I do?
     
  8. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #8
    Yes, it does. Not only on, but not asleep - fully on. Perhaps the $0.30/day .Mac costs is starting to seem worth it? ;)

    FWIW, your link (above) sends me to port 8080... any idea why? When you figure out how to set u your Belkin (sorry, don't know how...) you might want to open that port up as well (and on your Mac's firewall), but you'll likly need to tweak your Apache config to listen to it as well.

    Also, you might want to consider switching to DynDNS... it's free, all you have to do is verify your IP once a month, which can be automated - if you have problems with No-IP.
     
  9. matticus008 macrumors 68040

    matticus008

    Joined:
    Jan 16, 2005
    Location:
    Bay Area, CA
    #9
    Just poke around. As I recall, Belkin routers don't have that many configuration pages, so it should be fairly easy to find port forwarding settings. You could also try Belkin's website for a manual or online instructions.

    This is something you're going to want to pay the $7 to get. The free services are all crappy, and there's the advertising frames and service nightmares and bad account management, not to mention the fact that they own the name, not you, and can take it away from you at any time. Domain registration is so cheap that it's honestly not worth the hassle to deal with the free services.

    jsw already answered, but a solid echo is worthwhile. The computer has to be on 24/7 and set not to sleep, or no website. This is why most people don't host websites on their computers that stay in their bedrooms/offices and instead use the ones tucked into closets and basements or use a hosting service. The latter also relieves you of responsibility and bandwidth costs.

    Once you have a domain name, all you would do is point it to your no-ip site (xxxx.yyy.com) and that's all there is to it. But if you're committed to the free thing, you should just skip the domain name. The best you're likely to get is a subdomain with advertising, which adds to the advertising you've already got, and just gives you a different parent domain.

    Good luck with your router!
     
  10. edesignuk Moderator emeritus

    edesignuk

    Joined:
    Mar 25, 2002
    Location:
    London, England
    #10
    http://portforward.com may be able to help with port forwarding on the Belkin. I'm a Linksys fanboy myself :p
     
  11. zweigand macrumors 6502a

    zweigand

    Joined:
    Oct 19, 2003
    #11
    If you set up a "Static IP" service you don't have to verify anything. You don't have to have a Static IP to use that service either. I sure don't. If your IP doesn't change daily (or possibly weekly) you are much better off getting the static domain and downloading DNS Updater ...it runs as a daemon and whenever your IP changes it automatically updates it at DynDNS.org without you having to do anything.
     
  12. matticus008 macrumors 68040

    matticus008

    Joined:
    Jan 16, 2005
    Location:
    Bay Area, CA
    #12
    I think you're confusing a static IP locally with an ISP-assigned static IP. In order for the no-IP or DynDNS to work, you should have a static IP on your local network for the purposes of port forwarding, just to make your life easier.

    From the ISP, you'll have a dynamic IP, which is where DynDNS and similar services come in. If you have a static IP assigned from your service provider, you don't need DynDNS at all.
     
  13. zweigand macrumors 6502a

    zweigand

    Joined:
    Oct 19, 2003
    #13
    No, DynDNS.org has two separate services. One is for Static IPs and one is for Dynamic IPs. I know what you are talking about, but I don't use a router so my machine is direcly connected to the internet. (with a dynamic IP)

    I am just saying that if the IP to your router (or directly connected computer) is dynamic, but doesn't change all that often, go ahead and use their "Static IP" service because you won't have to verify it once a month like the dynamic service.
     
  14. matticus008 macrumors 68040

    matticus008

    Joined:
    Jan 16, 2005
    Location:
    Bay Area, CA
    #14
    Their static IP service isn't useful for anything, though, if you want a domain name of your own. If your IP doesn't change often or at all, then all you need is a domain name pointed to your IP. Why have two layers of service when one will suffice?
     
  15. trainguy77 macrumors 68040

    Joined:
    Nov 13, 2003
  16. zweigand macrumors 6502a

    zweigand

    Joined:
    Oct 19, 2003
    #16
    I agree with your above statement, but that isn't what I'm doing. It is very useful if you are satisfied with the Domain name from their service. I don't have a separately purchased domain name. I just wanted something I could remember.
     
  17. matticus008 macrumors 68040

    matticus008

    Joined:
    Jan 16, 2005
    Location:
    Bay Area, CA
    #17
    Ah, I see. I was just looking at it from the stated objectives of the OP, which is why I didn't understand the suggestion. Cheers :).
     
  18. zweigand macrumors 6502a

    zweigand

    Joined:
    Oct 19, 2003
    #18
    I read through it pretty fast ...I must have missed the part where he mentioned getting a regular domain name. I can see how my post was out of place in that scenario ;)
     
  19. wmmk thread starter macrumors 68020

    wmmk

    Joined:
    Mar 28, 2006
    Location:
    The Library.
    #19
    i've actually decided to go with teccion hosting. they're friendly, helpful, and a pleassure to work with. i would highly reccomend them.
    pianoudude123 from the boards here runs tteccion. he has helped me a ton, and i'm his company can do the same for you.
    (nobody's paying me to say this, pianodude has just been super helpful!)
     

Share This Page