Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 12-21-2008, 08:33 PM   #1
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
Question How to get apache to serve from a network address?

I have Apache running on an old computer on my LAN and I would like to know how to make Apache serve form another computer's external hard drive on my LAN. The target to the folder on the other computer looks like this, \\Alex-desktop\Alex's Documents. But if I put that into the config file for the folder to serve from it doesn't work. How can I accomplish this? thanks
__________________
Case...Cooler Master Centurion 5 | PSU...Corsair TX750
Mobo............Gigabyte GA-MA69G-S3H
CPU..............AMD Athlon 64 X2, OC @ 3.0ghz
RAM.............2gb Gskill DDR2 800
CPU Cooler...Zalman 9700
GPU.............Sapphire 4870HD
Monitor.........22" Acer LCD
Storage........500gb Seagate
DVD.............Lite On DVD Burner
Windows Vista 64 bit
amdalex is offline   Reply With Quote
Old 12-22-2008, 09:02 AM   #2
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
Apache won't run on UNC paths. You either have to use an IP address or hostname.
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 12-22-2008, 01:12 PM   #3
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
How can I do that? All the computers on my LAN have static IP addresses.
amdalex is offline   Reply With Quote
Old 12-22-2008, 01:50 PM   #4
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
Instead of referring to the computer name, use the IP address

http://192.x.x.x/

or whatever your IP addressing scheme would be.


But...you would have to have the apache service running on the computer that is hosting it. You can't just make a copy of an apache installation and expect it to run without an actually installation.
Force Flow is offline   Reply With Quote
Old 12-22-2008, 03:03 PM   #5
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
I tried this path, http://192.168.0.104/Alex's Documents/HTDOCS, and Apache said it the document root folder needs to be a directory. I have Apache running on an old computer just for serving the web page and I am trying to get it to serve from an external hard drive on a different computer. Apache works and serves the web page when it is on the computer's C drive, I just would like to keep all the website data on my external hard drive because the serving computer has a small hard drive.
amdalex is offline   Reply With Quote
Old 12-22-2008, 03:30 PM   #6
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
What's your root directory set to?

Chances are, you just need to go to http://192.168.0.104/
Force Flow is offline   Reply With Quote
Old 12-22-2008, 03:44 PM   #7
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
Do you mean the folder where index.html is? It is in folder HTDOCS. I've tried everything I can think of and it still says document root must be a directory.
amdalex is offline   Reply With Quote
Old 12-23-2008, 01:18 PM   #8
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
you can't access it as a server share. The document root is always the base address/url

What comes up when you go here:

http://192.168.0.104/
Force Flow is offline   Reply With Quote
Old 12-23-2008, 03:49 PM   #9
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
Quote:
Originally Posted by Force Flow
Do you mean if I put that into the document root line? When I do it says Document root must be a directory.
amdalex is offline   Reply With Quote
Old 12-23-2008, 10:04 PM   #10
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
nono..when you visit the IP address of the computer hosting apache...what happens?
Force Flow is offline   Reply With Quote
Old 12-24-2008, 10:35 AM   #11
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
It shows the web page that I set it to serve from the C drive for now on the host computer. The IP address of the computer running Apache is 192.168.0.105.
amdalex is offline   Reply With Quote
Old 12-24-2008, 03:46 PM   #12
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
ok, if that's the computer hosting apache, then that's where the web files you want to host have to live.
Force Flow is offline   Reply With Quote
Old 12-25-2008, 06:16 PM   #13
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
So I can't have files availible on the web from the other computer through the one running Apache?
amdalex is offline   Reply With Quote
Old 12-25-2008, 06:33 PM   #14
Member (11 bit)
 
Lespaul20's Avatar
 
Join Date: Apr 2003
Location: Iowa
Posts: 1,652
Quote:
Originally Posted by amdalex View Post
So I can't have files availible on the web from the other computer through the one running Apache?
You could share the drive out and possibility set up an alias.


http://www.thewebhostinghero.com/tut...che-alias.html
__________________
LP
Lespaul20 is offline   Reply With Quote
Old 12-25-2008, 08:52 PM   #15
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
The drive is shared I just want the document root folder to be located on the shared drive, is that possible?
amdalex is offline   Reply With Quote
Old 12-26-2008, 12:35 AM   #16
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
If it's possible, it probably won't be simple to implement. Why don't you just move the drive, copy over the files, or host apache on the computer with the external drive?
Force Flow is offline   Reply With Quote
Old 12-26-2008, 03:57 PM   #17
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
Thanks for your help. I'll just find another hard drive for the computer hosting Apache.
amdalex is offline   Reply With Quote
Old 12-26-2008, 05:56 PM   #18
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
It doesn't have to be on a seperate drive. You can set a directory as the root.
Force Flow is offline   Reply With Quote
Old 12-29-2008, 10:56 PM   #19
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
I know, my web server has a small hard drive but it should be fine for a while, anyways I got my website up and running with no-ip free dns. Now I just need to build a nice website, lol.
amdalex is offline   Reply With Quote
Old 12-30-2008, 07:17 PM   #20
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
If you're hosting for the public internet, you're better off using a cheap host, rather than your personal rig...security issues and the like.

I have a $6/mo account with surpasshosting.com, which would probably be more than enough for what you want to do.
Force Flow is offline   Reply With Quote
Old 12-31-2008, 10:14 PM   #21
Member (10 bit)
 
amdalex's Avatar
 
Join Date: Jan 2007
Location: Western PA
Posts: 691
I have the web server running on a 8 year old Pentium 3 machine. I would never run a web server on my own PC for the obvious security reasons.
amdalex is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:40 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2