Web Sharing?

cutman1000

Registered
Hi, I just registered a domain name today, and I was wondering if I could set up the Apache Web Server in OSX so that web site is at the domain name I registered instead of at http://your.computer.address/~yourusername. Does anyone know how to do this? Is it possible? thanks.

cutman
 

theed

Registered
I know the answers, I'm just not certain I'm sure what your question is.

The default directory on Mac OS X for apache is /Library/WebServer/Documents/
if you put things in there, they will appear under /www.yourname.com/

the ~username is a shortcut to go to any users directory on that machine, it's pretty convenient. I even placed dummy folders in my apache root called ~theed and ~ryan so that people can click on them and it'll take them to my folder or Ryan's folder. The folders I put in there are empty, the path gets resolved to the user.

As for resolving DNS, if you registered with someone who also provides DNS service you can simply point to your machine from that service. ... if your machine has the same IP all the time. DNS takes like a week to trickle through the internet, if you daon't have your IP address for more than a week at a time, DNS won't do you any good.

There are many more answers to be had, just ask more questions.
 

cutman1000

Registered
Thanks for the help, but I'm still confused. I'll elaborate on my situation. I registered www.lowcountryhunters.com on April 26, and I want to host the site on my G4 running OS X. To be honest, I have no idea what I'm doing, but I have created what I want the first page of the site to be. Now, what I want to know is...how can I set up the page I created to show up at www.lowcountryhunters.com? When I turn on Web Sharing, the site I created is under the index at http://my.ip.address/~my user name. That's not where I want my site to show up...I want it at www.lowcountryhunters.com. Does that make sense? Or am I still being to vague...

Also, while I'm at it...what program would y'all recommend to create my webpage. The only free program I could find was
Claris Home Page 2.0, and I ran it in OS 9.1. I'm not very impressed with it. I am at a college, so I might have access to some nice programs (or atleast some discounts) Any suggestions? Thanks again.

cutman
 

theed

Registered
1. I use DreamWeaver ... nice, but it has some rough edges as a mac program, feels like a windows port in a lot of places. Also, it's really not free.

2. You need to set up DNS so that the name you bought points to the IP address you have. This assumes you have a real, and static IP address. If your IP address begines with 10. or 172. or 192. or if it changes all the time ... you're screwed. You need to pay me $20 / month to host your site for you. :)

3. anything after the / is the path on the computer, and is resolved by your machine. Before the / (between http slashes and the slash after .com) are the internet resolution and that's where DNS comes in. The root of the site on your machine is at /Library/WebServer/Documents - put your files there to show up at your.ip/
if the first thing after the slash is a ~ then your machine (and the apache webserver) interpret this to be a request for a user's directory instead of the web root mentioned above.

On the subject of DNS, I'll give you some specifics in hopes of squashing any ambiguity in my explanation. If you registered with Register.com - you'll be able to log in there and specify the IP of the machine you'd like the name to point to. This will magically make yourname.com/ come up the same as your.ip/
If you registered with Network Solutions, you'll need to provide a DNS server ... a brief explanation...

When you type in a name of a place on the internet you'd like to go, your request first asks the master servers on the internet who holds the information for this domain? The answer points to your DNS server. Then, your machine has to ask the DNS server what machine is pointed to by this specific address. The answer is your.ip. Then the client proceedss to make requests from your.ip

Register.com provides DNS servers for you that you can modify so that all you have to provide is a machine running a webserver (or whatever) whereas Network Solutions only provides master lookup so that you can specify your DNS server. If you don't have your own DNS server ... $20 ;-)
 

cutman1000

Registered
Theed,
Thanks for all the help, but I think that I am screwed. First of all, I have a 172. IP Address, so I guess that I can't host my own site. However, when I leave school in a couple of weeks, I will have my @home cable modem account again...do you have any idea if that will work for me? I might end up having to pay someone to host the site after all.
I did in fact register with register.com, so I guess that I just need to get all the correct information from them. Thanks again for your help, and I'll let you know if I need you to host!

cutman

PS My school uses Dreamweaver, so maybe I can get it through them!
 

theed

Registered
computers at my school had real IP's but we had numerous issues with boxes getting hacked into from the outside and used to disrupt network traffic or just generally trashed. Mostly linux boxes were the victims.

Perhaps it's best that you don't have real IP's, it means less hacking.

As for cable modems - the vast majority of cable modem providers dynamically allocate IP's, meaning your IP will be real, but it will change every day or so. Wait and see I guess. Best of luck. ... and keep in touch. ;-)
 

cutman1000

Registered
Theed,
I just noticed that my IP Address begins with 152. not 172., so I may not be screwed after all. I put the web page I wanted in the Library/Webserver/Documents, but when I go to the site on the internet (www.lowcountryhunters.com), it takes me to the "Test Page for Apache Installation." It says that "If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page." I already copied my page lowcountryhunters.html file into the Documents folder....how do I replace the Test page? Thanks.

cutman
 

djeans

Registered
Cutman,

I just checked out your site, it is there, but you need to rename it index.html

Right now you can access it by going to http://www.lowcountryhunters.com/lowcountryhunters.html
but i dont think that is your goal. Also none of the images showed up. might need to re-link them. At least you know your server is up and running and that everything is configured correctly.

djeans
 

cutman1000

Registered
Ok, thanks djeans. So if I rename my home page index.com, it should work without having to type www.lowcountryhunters.com/index? Thanks for all the help, fellas! You have all made it a lot easier for me.

cutman

PS I know the images don't work...the program I used to make the page sucks (Claris Home Page.), so I am learning HTML. The site should be up by the end of the weekend. Thanks again.
 

theed

Registered
the page that shows up by default in a directoery under the standard apache setup is ...
index.html

I tried to get to your box. Perhaps you turned it off. Perhaps there is some firewall protecting you from any harful activity such as requesting information from port 80... I tried to ping and got nothing, I tried to telnet and get a whacked firewall login prompt. ... it feels like you have some serious (stiff) security going on at your front door. Are you sure they don't mind you running a webserver?

Oh, and go easy on Claris Home Page. I might take it personally. :)
Every tool has its uses.

If I remember correctly, CHP fixed links on ftp upload, so if you circumvent its upload procedure, that may be where it became unfriendly
 

cutman1000

Registered
Thanks for trying to check out my site, fellas, but I turned it off early yesterday so that I could switch back into OS 9 to work effectively in Photoshop, Simpletext (html), etc. OS X Classic wasn't stable enough to run Photoshop without crashing everyonce in a while.
I'm pretty sure that I can host a website, but I will turn it back on later just to check.
Hey, you know I meant nothing personal about Claris Home Page...after all you've done to help me get this thing up and running, I wouldn't even dream of trying to offend you. :) I just can't figure out the program, and I don't feel like I have full control of my site when I use it. I bought a book on HTML on Friday, and I already know how to do the exact same stuff that CHP could do. I think that HTML is the way to go...
Alright, now that I'm done with my first page, I will save it as index.html, put it in my Webserver/Documents folder, and hopefully it will work! Thanks again for all the help everyone.

cutman
 

theed

Registered
While we're on the subject.

There's always a reason to do some tweaking in raw HTML. Don't play with CHP after you've customized your HTML by hand, CHP has a tendency to fix things for you against your will. DreamWeaver on the other hand is pretty good about not changing anything unless you've told it to.

Best of luck. ED.
 
Top