setting up local server
How would one go about creating a server on your own PC? I've tried setting up a "Web Folder" by way of My Computer.
Can you tell I have no idea what I'm doing? But I do know what I want to do... I want to be able to properly preview shtml and php files.
Am I even asking the right question?
krash_io posted this at 02:08 — 26th January 2002.
They have: 49 posts
Joined: Dec 2001
Wow, I think your getting yourself into a project larger than you think. lol
Its really not that hard to set up a server on your local machine, but I may be confusing at first and it will defiantly be a learning experience.
The first thing you need to do is get a web server. If you have windows 2000 you should have a built in web server called IIS server. It may or may not already be installed. Reffer to your windows documentation on how to install and use it.
The web server I use is Apache. Apache is an open-source web server. That means its free for anyone to use. Its not as user friendly to use however. But it is very easy to set up after you have downloaded and installed the correct version.
I'm not sure what you will need to do to enable the web server to correctly serve shtml and php files. I don't use either language so i'm no familiar with how to use these. You will probably need to install a module for your webserver to get these to work correctly. For instance, Perl will run by defauly on a Apache web server on a Linux machine, but to enable Perl to run on windows you need to install a moadule for Apache. You can search the web and your webserver documentation for help on that.
If you decide to go with Apache, go to apache.org and read up on. I'd say the more you read the better off you are. Don't just jump into it, take a few hours at least to read up on it, prefably a few days. When you feel comfortable download and install it. After you have it installed you only need to do a few configures in a file called httpd.conf to get it up and running for basic service.
If you go with apache and need help setting up or configuring, just make another post, I'll be glad to help.
Krash_io
RecipeBOMB.com
ComputerBOMB.com
Krash_io
www.recipebomb.com
www.computerbomb.com
alda.b posted this at 03:48 — 26th January 2002.
They have: 44 posts
Joined: Dec 2001
Thanks for the info. I actually did download and install Apache onto a Win98 machine. Not knowing what the heck I am doing is not helpful at all. For some reason, this particular task requires a higher learning curve of myself.
From your response, I take it there is no quick and easy way about this... I'll have to buckle down and read something!
Thank you very much for your response.
Word-Forums
krash_io posted this at 04:03 — 26th January 2002.
They have: 49 posts
Joined: Dec 2001
Its actually pretty easy to get basic service if you've already installed it.
Search the web and Apache.org for info on that php and shtml stuff.
Try this:
1. There is a folder under the directory where you installed Apache called "conf" go to that folder.
2. Open the file in notepad called httpd.conf
3. Scroll down in that file about one page until you see this
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "E:/server/public"
4. Change where is says "E:/server/public" to the directory where you host your web pages at. I host my pages out of E:/server/public.
5. Scroll down, about 7 pages maybe, to where you see
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName 127.0.0.1
6. Change the server name to 127.0.0.1 if it is not already set.
7. Below that you should see
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "E:\server\public"
Change the document root to the same exact thing you put in step 4.
8. Move down about 3/4 page and you'll see something like this
#
# This should be changed to whatever you set DocumentRoot to.
#
9. Again change the Directory path to the same as step 4.
10. save that file, open up a browser and type 127.0.0.1 in the location field. You should see a default page from Apache saying your up!
You can try putting a test page under your server directory like test.html and type 127.0.0.1/test.html and you should see it.
Let me know if that works. It should unless you have a really different version of Apache that I.
Krash_io
recipeBOMB.com
computerBOMB.com
Krash_io
www.recipebomb.com
www.computerbomb.com
alda.b posted this at 07:00 — 26th January 2002.
They have: 44 posts
Joined: Dec 2001
My computer does not have an E drive. Will it create one if I enter that line? If not, do I have to create the path I want it located?
Word-Forums
yabber posted this at 07:20 — 26th January 2002.
They have: 93 posts
Joined: Dec 2001
The best way I have found to install Apache and configure it as a web server is to use "foxserve 2.0" you can download it from http://foxserv.linuxmax.net/portal_database.php?action=view&fid=2&cid=1
It installs & configures Apache, perl, PHP & MySQL. and creates the right directory structure so you just replace the default index.html file with your own & add the rest of your pages and everyone can view it from your IP address.
Mika
krash_io posted this at 08:05 — 26th January 2002.
They have: 49 posts
Joined: Dec 2001
No I have an E: drive because I have 3 operating systems and 6 partations across 80 gigs of hard drive space! lol
Its a real mess
YOu may only have a c or d drive. THe drive doesn't matter as long as it exisit on your computer. If you wanted to server the web pages off your desktop under a folder call "web" the path would be "C:/windows/desktop/web".
Krash_io
Krash_io
www.recipebomb.com
www.computerbomb.com
alda.b posted this at 08:31 — 26th January 2002.
They have: 44 posts
Joined: Dec 2001
I created c:web/public_html and entered that into the lines of the htppd.conf document, but am getting a DNS error when I try to access 127.0.0.1 or 127.0.0.1/test.html (yes, I did put test.html in there).
But. I do know something has happened. When I preview an html file from Dreamweaver, the browser goes to this location "http://localhost/web/TMPqd19wqil44.html" and then says page cannot be displayed.
I am testing it in IE5.5 w/ 128 bit encryption and NN4.08, don't know what type of security.
Word-Forums
krash_io posted this at 08:37 — 26th January 2002.
They have: 49 posts
Joined: Dec 2001
Did you put "c:web/public_html " in the httpd.conf file? or
"c:/web/public_html"? The later is the correct way. Also make sure you save the file with the changes and make sure you are actually running apache. You will need to go to start > programs > apache > control > start apache.
or something like that, it may be slightly different starting it depedning on your version.
Krash_io
Krash_io
www.recipebomb.com
www.computerbomb.com
alda.b posted this at 08:47 — 26th January 2002.
They have: 44 posts
Joined: Dec 2001
Like I said before... I have no idea what (or even why I'm doing what) I'm doing...
So, I started Apache and got an error on line something or rather. Am off to see if I can fix it.
Thx for your help!
Word-Forums
Busy posted this at 09:09 — 26th January 2002.
He has: 6,151 posts
Joined: May 2001
go to http://firepages.com.au/altindex.php3 in the forums they mention about having things in the same drive etc
i use their phpdev bundle (apache, php, mysql, perl etc) works off localhost (http://localhost/ which is the same as http://127.0.0.1/ )
My set up went smooth except I cant run IE off line, doesnt worry me as I build on NS and Opera anyway
alda.b posted this at 09:10 — 26th January 2002.
They have: 44 posts
Joined: Dec 2001
I got the server to run and can access 127.0.0.1 by using "C:\Program Files\Apache Group\Apache" in the lines. However, I still cannot preview an shtml or html file from Dreamweaver. I still get "http://localhost/web/TMPrmupmqimri.html" as a page cannot be found.
Do I need to move my web files to the Apache folder that the httpd.conf file is using?
Word-Forums
krash_io posted this at 09:19 — 26th January 2002.
They have: 49 posts
Joined: Dec 2001
Ok, that directory you set in the httpd.cong file (they are all the same) is where you are hosting teh web pages from. Any web page you want to serve must be under that folder.
Say you set the apache root directory (the directory you used in httpd.conf is the "root" directory ) to "C:\Program Files\Apache Group\Apache". To access a file in that folder off the web you would use your computers IP address or you would use 127.0.0.1 if you wanted to run it off your local machine. 127.0.0.1 kind of points to C:\Program Files\Apache Group\Apache, so think of them as the same folder. If you made a folder under C:\Program Files\Apache Group\Apache named "personal" with a file called "resume.htm" in it, you would have to type 127.0.0.1/personal/resume.htm to access it.
Krash_io
Krash_io
www.recipebomb.com
www.computerbomb.com
alda.b posted this at 09:25 — 26th January 2002.
They have: 44 posts
Joined: Dec 2001
Bummer. I had hoped to serve the pages from c:\web\public_html folder cuz it is the same path as my remote file directory.
But, with everyone's help, I think I can play around with it enough that I might be able to have it set up that way afterall.
Thank you!!!!
(be warned though... I may be back ah ah ah!)
Word-Forums
krash_io posted this at 02:01 — 27th January 2002.
They have: 49 posts
Joined: Dec 2001
You can server the pages out of any directory. It doesn't matter.
Tidusquall posted this at 20:38 — 18th October 2004.
He has: 3 posts
Joined: Oct 2004
erm... I have read the entire thread (it helped alot really, but i need my current computer, and it as small disk space, however i'll buy one just to serve) i still dun understand 1 thing. how to use the Universal resource locator(URL) there i mean name the website something and when i place the name of the site it wouldredirect me to my IP and then to my root directory. U r a webhost manager u should know how to awnser.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.