PDA

View Full Version : apache help needed


robin801
12-01-2003, 6:26 PM
i just installed apache to my win2k pro system and it is running.(at least i get the default page when i type localhost.)

my question is how do i get my photos onto my website?

i registered a domain name(that i can access).
i registered at zoneedit.com(for dns)

this is where my page is being held until i do something with it.

http://family-fun-site.com/

can anybody access this page?

i have my box with apache set with a static ip and the other boxes using dchp.

what else do i need to do?

a Bill
12-01-2003, 7:48 PM
I'm getting a Verio temporary site. Did you have your domain name company change DNS to point to your servers IP? It really only takes an hour or so to propigate but it's always best to give them 24 hours.

I only use Apache on Unix boxes so I don't know the path on your MS box but in the htdocs folder there should be an index.html file. That file will be the first page that pops up when you access the site via the URL. Where you go from there is up to you. I try to keep all my junk in seperate files/folders in that same directory so I know where everything is.

So to upload photos to your personal Win2k server you just drop the pictures in the directory of your choice and point the hyperlinks on the index.html file to them. You can also rename the index.html file as long as you remember to tell the Apache configuration file to use the new name.

Are you using a personal router too? If so, you need to tell the router to route traffic from your URL to your web server. Normally you'll open up port 80 unless you're running the Apache web server on another port like 443 if it's a secure site.

robin801
12-01-2003, 8:26 PM
Did you have your domain name company change DNS to point to your servers IP?

i did that.:)

So to upload photos to your personal Win2k server you just drop the pictures in the directory of your choice and point the hyperlinks on the index.html file to them

so i upload my photos to D:\photo and how do i hyperlink to the index.html file?

there are alot of index.html files in the htdocs folder.

which one do i use?

mholtum
12-01-2003, 8:37 PM
Use the index.html that is in your root dir of the server structure. I am not familiar with apache as I have used IIS but that are in fact very similar.

In IIS it would be C:\Inetpub\wwwroot\index.html

a Bill
12-02-2003, 12:01 PM
I'm still getting sent to a Verios site. The IP is 161.58.134.99 which appears to be in Sterling, Virginia. Maybe DNS hasn't propigated yet.

The index.html file you want to use has no additional extensions, it is exactly as I wrote it. The index.html file is the first page you see when you hit your website. You just over write this page with your webpage and leave it titled index.html or you can change it like I mentioned previously by editing the http.conf file line shown to reflect the new name...

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
DirectoryIndex index.html

Back to the photos. Put the path to the file in the link on the main page (index.html page). I wanted to link to another pager so I did this...

< a href="storage/sun.html">Sun Stuff</a >

...and the actual pictures would be like this...

<img src="adapter.JPG" alt="Adapter">

...now with that picture, it is located in the SAME directory/folder as the sun.html page so the path is as short as it gets. If I kept the picture in a different location I would tell it something like storage/adapter.JPG instead.

The Apache FAQ (http://httpd.apache.org/docs/misc/FAQ.html) is pretty good and there is still more documentation on their website.

robin801
12-02-2003, 2:22 PM
maybe i'm not wording my question right.

what changes do i have to make in apache in order to reach my website(family-fin-site)?

when i type localhost in the browser it opens up the window with the text changes that i made but it doesn't open up my website.

i hope i explained this correctly.

mholtum
12-02-2003, 4:02 PM
If you are hosting your site locally, and have a static IP like you said you have to point your domain to your IP. Then when you go to http://www.yoursite.com you will be hitting your sever.

I registered my site at http://www.godaddy.com. I used tools under my account to do this..

If you haven't you will never hit your server.

a Bill
12-02-2003, 7:14 PM
If you are hosting your site locally, and have a static IP like you said you have to point your domain to your IP. Then when you go to http://www.yoursite.com you will be hitting your server.

Right, that's what the DNS folks are supposed to do, make your domain name resolve to YOUR servers IP. Right now it's still pointing at the Verio site.

As long as you have port 80 open, apache is running and an internet connection is live to the server, there is nothing else needed from apache. As long as apache is running on your server it will serve up whatever page you built for it whenever it's requested. Even if you didn't put up any content apache will send out the default web page which is your original index.html file that came with apache. Most folks use that page immediately after installing apache to see if it is running correctly.

Hmm, I don't quite grasp what you're asking so correct me if I'm wrong. You're typing in 'localhost' but it doesn't come up with the website. This means that either apache isn't running, you're not on the apache server or the server name in the http.conf file is pointing at the wrong name/IP.

So make sure apache is running, double check the IP that the DNS is supposed to be pointing at and read through the FAQ at apache.org for more info on Windows usage. I only use apache on FreeBSD, Linux and Solaris so I can't be more specific on your paths and configuration data.

If you've got your webserver locked down and online then you can post the IP and we on the outside can at least tell you what we do see.

mholtum
12-02-2003, 8:17 PM
"when i type localhost in the browser it opens up the window with the text changes that i made but it doesn't open up my website."

Typing "localhost" will show you the files on the computer. Typing http://www.yoursite.com will check if it is live. Even if you did see your site by typing "localhost" that wouldn't tell if it were live or not as you arnt using the internet to acess it.

Type in http://yourIPadresshere and see what happens. Sometimes it takes a few days to resolve. And you can still access it through your IP.

mholtum
12-02-2003, 8:17 PM
What is you domain name and your static IP address?

robin801
12-02-2003, 8:33 PM
my domain name is---family-fun-site.com

mholtum
12-02-2003, 9:19 PM
whats the IP of your home Server? I will try to hit it from here.

start/run/type CMD/ type ipconfig

mholtum
12-02-2003, 9:22 PM
I am still getting a Verio Temp site. SO if you did it correctly it hasnt resolved yet.

mholtum
12-03-2003, 1:41 AM
What's your IP?

robin801
12-03-2003, 12:35 PM
mholtum---ygpm

mholtum
12-03-2003, 1:50 PM
so do you ;)

robin801
12-03-2003, 2:52 PM
i want to thank mholtum for taking the time to help me get my server started.

robin801
12-05-2003, 5:22 PM
had the server up and running last night.

cut the server down and today it won't connect to my site.

any suggestions on correcting this problem?

a Bill
12-06-2003, 3:29 PM
I'm not sure what you mean by "cut the server down" but I'm guessing you rebooted or powered it off for a bit then brought it back up.

Make sure apache is running.