domain name hosting...

octane

I have issues, OK!
OK Unix fiends, let's see what you're made of!

1) I'd like to host a domain name from my G4. Is this possible _without_ Panther Server over broadband?

2) Some time in December, I come across a posting that made reference to being able to change the 127.0.0.1 to something more descriptive like octane or whatever. How do I do that?

Any help is -- as always _hugely_ appreciated...
 
1)probably not. you need a high upload speed and a static ip, which consumer level broadband doesnt tend to give out.

2) what do you mean by 'change the 127.0.0.1' ? you can set a computer name in sharing prefs...


just get a cheap host, you can get a domain and basic hosting for about the same as a domain so unless you have some compelling reason to host it yourself its really not worth it
 
you can edit /etc/hosts to list 127.0.0.1 as octane, dont modify localhost entry just add octane as an entry...
 
1) Sure you can. You simply need to know the DNS addresses assigned to your computer. To find this out, go to the first junction working from the Internet to your computer and see if its manual says anything (this will probably be your broadband modem). If it's unhelpful, go to the next one, like a router. Keep going until you get back to the computer, looking for 2 DNS addresses. You might have to get DNS addresses from your ISP; if so, put them in the appropriate box in the TCP/IP tab of the Network preference pane.

2) Don't know..
 
OK, lots of confusion.

First off, I have a static IP address; I have business broadband [it was free anyway!]

Secondly, I'm going to need a little hand-holding here. So when people say; 'yeh! Just go to etc/conf/blah and do loads of stuff...' making the assumption that I know what you mean, I don't! :confused:

Arden: I have no idea what you just said! ;-)

I need to be able to set up my G4 so that my clients can get to the web-based applications I develop for them.

I've currently got the IP address to jump through the router and link to the web server. So [when activated] if someone goes to the IP address, they see my web server with all of my applications.

PHP & MySQL I know, Apache .. hmm! Unix .. err, no!
 
To read the hosts file, open Terminal and type sudo pico /etc/hosts followed by your password. To modify it, um, ask someone else...

Did you understand my post about DNS servers at least?
 
Arden said:
Did you understand my post about DNS servers at least?

Not a word of it!

Going off-line for a few hours. I need to sleep 'n' stuff like that...
 
when you open the file add this line:

Code:
127.0.0.1                octane

you can always rename octane of course to whatever you'd like....

- Mike
 
WeeZer51402 said:
when you open the file add this line:

Code:
127.0.0.1                octane

you can always rename octane of course to whatever you'd like....

- Mike

I thought that was what you meant, but I didn't want to faff around and break the damn think on an assumption!

Know anything about domain name hosting?
 
To host your own domain, you need to use Bind (not sure if it's in OS X, it's normally sitting in Linux). However, I've never got round to messing with DNS.

I need to look into his myself because I'm trying to set-up several VirtualHosts on my machine.

Anyway, concerning your problem. Do you have a domain name registered anywhere? (i.e. octane.co.uk (which I presume is taken :) ). Can you also browse (from an entirely different machine) to your IP address (not 127.0.0.1, but the ISP assigned one... http://200.001.110.10 (or whatever)). The quick route (if you have a registered domain and can browse to your static IP) would be to:

1. call/e-mail your ISP/broadband provider. Ask them to point the domain name to your static IP address (the IP address where Apache is residing (your server/machine))
2. Then open up httpd.conf (the Apache configuration file). Do the following in the terminal to edit this:
Code:
pico /private/etc/httpd/httpd.conf

Then, find the ServerName line (within Pico press Cntrl-w to search for text, and type ServerName in). You should see an uncommented line with the title ServerName and whatever comes after that. Change the servername to whatever domain you got assigned by the ISP.

Remember, any changes to the httpd.conf file will only take effect after restarting the Apache server. You can quickly do this in the terminal with (exit pico first with Cntrl-x (it'll ask you to save, do so):
Code:
sudo apachectl graceful

Hope this helps. It's the easiest option (and should be provided free by any host, particularly if it's a business broadband option). Who's your provider?
 
I had setup a "webhosting" server for my friends with Apache (on Windows Server, but Apache is Apache). Basically let them put their webfiles in a user folder such that anyone could access their files by going to h**p://my-static-ip/~username. I had one of my friends forwarding a domain that he registered to his path so that people could access it by typing in the domain name, you couldn't tell that it was being hosted out of a sub-folder. He registered his web address through godaddy.com.

I haven't tried hosting my own domain names from the server, but on my PowerBook, when I was working for an online golf store last year, I had some local folders setup for two different test sites. I was able to give them "local" domain names by going into NetInfo and adding domain names such as "fakedomain.local" along with the standard localhost entry. I was then able to setup Virtual Hosting in the Apache config file so that intead of typing the path to my local folder like "localhost/~myusername/testsites/website1" I could just type in "fakedomain.local". I think this would work if they were real web addresses that you have registered and you can specify paths to different folders in the Apache config. I haven't tested this either since I don't have any registered.

http://www.evolt.org/article/Enabling_Virtual_Hosts_on_MacOS_X/18/13138/
 
The problem at the minute with hosting my own web applications is the path set up.

For me to view and work with my files, I need to look to: http://localhost/application/

For my clients to view my applications, they go to: http://ipaddress/application/

Now the fun really starts here because internally, I reference everything as: http://localhost/application/ so when my clients hit my server, they don't see anything because localhost can't be resolved so they get a big fat 404.

So if I've got this correct, by adding a new line to my hosts file, could I set up a domain name that both would be able to see? Or have I got this horribly wrong?
 
If you set your domain name to point to your DNS IP addresses, in a few days you'll be able to type it into your browser & view your files. Then you can use your domain address instead of either localhost or your IP address.
 
octane said:
The problem at the minute with hosting my own web applications is the path set up.

For me to view and work with my files, I need to look to: http://localhost/application/

For my clients to view my applications, they go to: http://ipaddress/application/

Now the fun really starts here because internally, I reference everything as: http://localhost/application/ so when my clients hit my server, they don't see anything because localhost can't be resolved so they get a big fat 404.

So if I've got this correct, by adding a new line to my hosts file, could I set up a domain name that both would be able to see? Or have I got this horribly wrong?

It seems like the best solution would be to reference paths and files by relative paths instead of absolute paths if possible. What are you using to create your web apps?
 
btoth said:
It seems like the best solution would be to reference paths and files by relative paths instead of absolute paths if possible. What are you using to create your web apps?

I have a _lot_ of application code! That said, I could do a massive search & replace from within BBEdit :p

I use a mixture of development tools; BBEdit, Adobe Golive, Xcode et cetera.

I have to use absolute paths because of the way some of the applications talk to one another...
 
octane, i dont know if anyone else had said this but i have found DNS and webhosting much easier on linux, primarily the dns part of it, for osx afp548.com has some dns config software for os x called bindery, its ok but not nearly as user friendly as the linux config tool. panther server has some good dns stuff too though.
 
WeeZer51402 said:
octane, i dont know if anyone else had said this but i have found DNS and webhosting much easier on linux...

I had imagined it would be, but I'd rather be learning to do something new on something old rather than on something else new .. if you know what I mean?..
 
Back
Top