Click to See Complete Forum and Search --> : How to set the domain name?


avinsinanan
03-23-2003, 07:00 PM
Hello,

Ok so i am very very new to Apache. So the deafult server address on Apache is http://localhost/ right.

So when I run apahe and type http://localhost/ in my explorer window the default pages comes up.

So I am making a web page and i want to host it at http://localhost/ right. Am i makings ense so far?

So I want my webpage to be hosted at

http://localhost/avin

How do I do this.

Also I want to upload my first page index.php or index.html to it.

Could someone please give me instrctions to do this without any big words :)

Thanks

Yours Respectfully
Avin Sinanan

Rune
03-26-2003, 03:39 PM
"localhost" won't work, unfortunately. "localhost" tells the viewer's computer to look ... well ... locally. :)

Which means if you went to http://localhost from your computer ... you'd get YOUR computer. If I went to http://localhost from MY computer ... I'd get MY computer, not yours. :)

You need to set the the domain name to a valid registerred domain name if you have one (ie www.mydomain.com), or to your local IP address (ie 123.45.67.890 or whatever your IP is).


As for uploading index.php index.html files, I'm not sure what your asking. If you're going to have index.php in a folder, you need to change a line in your Apache>conf>httpd.conf file from:
DirectoryIndex index.html index.html.var
... to:
DirectoryIndex index.html index.html.var index.php
so Apache knows to treat index.php as an "index" page (it doesn't know what to do with that extension 'til ya tell it).

If you're asking about putting index.htm, index.html, index.php, etc all in the same folder ... I don't really know what Apache will do with that. It may attempt them in the order listed in the above line code (ie it'll look for index.html first, if there isn't one it'll look for index.html.var, etc) ... but I'm not really sure on that.