PDA

View Full Version : Webservers

Raven_Writer
05-04-2003, 12:52 PM
How would you set up a windows computer to use Apache, php, mysql, and etc.., and make it become a webserver also?

I've used phpdev, which includes all the above and then some, but I've never been able to have apache run my stuff from my computer publicly.

Brandon Martus
05-04-2003, 02:29 PM
Originally posted by Raven_Writer
How would you set up a windows computer to use Apache, php, mysql, and etc.., and make it become a webserver also?

I've used phpdev, which includes all the above and then some, but I've never been able to have apache run my stuff from my computer publicly.

Go to

http://www.apache.org
http://www.mysql.com
http://www.php.net

Download the appropriate files, read the appropriate installation instructions, do what they say, and then you have yourself a web server. :)

Raven_Writer
05-04-2003, 02:32 PM
Originally posted by Brandon Martus
Go to

http://www.apache.org
http://www.mysql.com
http://www.php.net

Download the appropriate files, read the appropriate installation instructions, do what they say, and then you have yourself a web server. :)
Thank you. I'll post back and say how it went.

Trashed20
05-04-2003, 02:47 PM
im not sure if you wanted this to be a testing server or an actual webserver so punch me in the face if im stupid :p

to set it up as a local testing server you need to set the ServerName field in your apache config file to 127.0.0.1 (or localhost)

to have it accessable to everyone else on the web you would need to change ServerName to your ip address which can be found using ipconfig in a dos prompt of you choice.

oh, and i suggest getting apache 1.3 as apache 2.0 has some problems with php. while there is versions for 2.0 they are buggy and kinda hard to configure.

hope i helped in any way possible. :)

Raven_Writer
05-04-2003, 02:50 PM
Originally posted by Trashed20
im not sure if you wanted this to be a testing server or an actual webserver so punch me in the face if im stupid :p

to set it up as a local testing server you need to set the ServerName field in your apache config file to 127.0.0.1 (or localhost)

to have it accessable to everyone else on the web you would need to change ServerName to your ip address which can be found using ipconfig in a dos prompt of you choice.

oh, and i suggest getting apache 1.3 as apache 2.0 has some problems with php. while there is versions for 2.0 they are buggy and kinda hard to configure.

hope i helped in any way possible. :)
an actual webserver is what i'm looking for. I am currently using phpdev w/ apache v1.3.27. It includes mysql, php, apache, and everything.

AJ Quick
05-04-2003, 03:11 PM
I installed a server on my desktop using all the files downloaded individually. Took me about 3 hours to get set up right.. on my laptop, I found a program called "FoxServ" that installs and configures everything for you in about 5 minutes. Check this program out, and look for others that do the same..

http://www.foxserv.net/portal.php

Raven_Writer
05-04-2003, 03:20 PM
Originally posted by AJ Quick
I installed a server on my desktop using all the files downloaded individually. Took me about 3 hours to get set up right.. on my laptop, I found a program called "FoxServ" that installs and configures everything for you in about 5 minutes. Check this program out, and look for others that do the same..

http://www.foxserv.net/portal.php
I'm trying it out right now (DSL is god!!!). I'm downloading it right now, and when it's done, I'll check it all out.

Well, I have it installed. But no one besides me can view it still ( test it here and please tell me what u see / what happens: http://php-test.homeunix.com/ )

sanddrag
05-04-2003, 04:15 PM
Originally posted by Raven_Writer
Well, I have it installed. But no one besides me can view it still ( test it here and please tell me what u see / what happens: http://php-test.homeunix.com/ ) "The page cannot be displayed" Perhaps you need to wait a day for DNS updates?

How hard is it to do this sort of thing? I'd really like to run my own web server. I have cable modem for my internet connection. If you'd let me know all of what is involved in this I'd really appreciate it.

Raven_Writer
05-04-2003, 04:17 PM
Originally posted by sanddrag
"The page cannot be displayed" Perhaps you need to wait a day for DNS updates?

How hard is it to do this sort of thing? I'd really like to run my own web server. I have cable modem for my internet connection. If you'd let me know all of what is involved in this I'd really appreciate it.
Maybe...I'm going through dyndns.org by the way.

For me, as you may have realized, it's a big pain in the arse.

I've got a 1.5 meg DSL connection, which is pretty good.

Download the stuff from the links brandon gave, and try to set it up yourself, it's all I can say. Chances are that I'm dead wrong on this point.

evulish
05-04-2003, 04:29 PM
Hmm. Make sure you have a line like this:
ServerName php-test.homeunix.com

and

ServerType standalone

...in your httpd.conf file.

Also, you need to restart it after changing the conf file, if you didn't know.

Raven_Writer
05-04-2003, 04:31 PM
Originally posted by evulish
Hmm. Make sure you have a line like this:
ServerName php-test.homeunix.com

and

ServerType standalone

...in your httpd.conf file.

Also, you need to restart it after changing the conf file, if you didn't know.
Ok, thanks.

yea, I knew about restarting apache after (after like, 20 times of confusion).

Thanks again

It should work now. The page should just say hi!

evulish
05-04-2003, 04:41 PM
It's 'forbidden.' Hmm. Not totally positive how to fix that on a Windows system without permissions. Make sure you have your DocumentRoot set correctly.

Raven_Writer
05-04-2003, 04:42 PM
Originally posted by evulish
It's 'forbidden.' Hmm. Not totally positive how to fix that on a Windows system without permissions. Make sure you have your DocumentRoot set correctly.
What should it be?

evulish
05-04-2003, 04:44 PM
DocumentRoot "C:\\path\\to\\webpage"

No trailing slashes, either (and yes, there are supposed to be two)

Raven_Writer
05-04-2003, 04:45 PM
Originally posted by evulish
DocumentRoot "C:\\path\\to\\webpage"

No trailing slashes, either (and yes, there are supposed to be two)
Ok, thank you.

I'll try that in a bit

I did that, and hopefully it works now

Petey
05-09-2003, 02:04 PM
Originally posted by Raven_Writer
How would you set up a windows computer to use Apache, php, mysql, and etc.., and make it become a webserver also?

I've used phpdev, which includes all the above and then some, but I've never been able to have apache run my stuff from my computer publicly.

A) Wipe your hard disk
B) Installc FreeBSD
C) Marvel at the effervescent power of two tone command line happiness.

--Petey

Raven_Writer
05-09-2003, 02:46 PM
Originally posted by Petey
A) Wipe your hard disk
B) Installc FreeBSD
C) Marvel at the effervescent power of two tone command line happiness.

--Petey
I would like to state that before, anyone else says to install a server o/s like freebsd, or unix, I am not allowed to. This is not my computer, and my parents won't let me install Linux even, which is why I'm screwed on this webserver issue.

Stephen Kowski
05-09-2003, 04:36 PM
pfffft get win 2k3 web server....woohoo iis 6.0 & .NET!!!

Stefan
05-10-2003, 03:48 PM
win 2k3 server... that would be total ownage.... If u have DSL / cable note ... ur IP address is probally dynamic. which mean everytime you turn your comp off u get new ip address... I just use my apache for testing new site layouts, as a DL mirror for WHSGG, and holding school projects incase one of our schools comps desides the floppy or zip disk is corrupted .... which happens 2x a semister.
NOTE: Also dont try apache on winME my friend did and nada happened.
NOTE2: You may have to set your router to enable http server. Which may be under virtural server settings or something with the word server in it.... It varies from router to router.....

Gadget470
05-10-2003, 08:20 PM
As of now, it's "Forbidden" meaning you don't have a DirectoryIndex:
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>

replace index.html with whatever you want (i.e. main.html or start.html

Keep in mind that for [u]EVERY[/i] directory you need that file in it or you will get either Forbidden or the Folder Contents.

To give open access (Which will show Folder Contents to folders without an DirectoryIndex file):
If I'm not mistaken:
Options +Indexes FollowSymLinks MultiViews is the default value.
Remove the + so that it now reads:
Options Indexes FollowSymLinks MultiViews

This will allow directory browsing for folders without the DirectoryIndex

Raven_Writer
05-10-2003, 08:28 PM
Ok, I did what gadget suggested, and it should work now. so please test it here (http://php-test.homeunix.com) I hope it works atleast soon.

Gadget470
05-10-2003, 08:54 PM
To anyone following this thread: He and I got it working, his problem was:

<Directory ...>
...
Order allow,deny
Allow from 69.14.54.153
# Allow from localhost 127.0.0.1
</Directory>
(...'s for protection) needed to be:

<Directory ...>
...
Order allow,deny
Allow from all
# Allow from localhost 127.0.0.1
</Directory>

He was allowing only his own IP to see what was on the server, and an implicit deny statement was after it. Now he went from:
Order allow,deny
Allow from 69.14.54.153
deny from all

to:
Order allow,deny
Allow from all
Deny from all

Raven_Writer
05-10-2003, 08:59 PM
Originally posted by Gadget470
To anyone following this thread: He and I got it working, his problem was:

<Directory ...>
...
Order allow,deny
Allow from 69.14.54.153
# Allow from localhost 127.0.0.1
</Directory>
(...'s for protection) needed to be:

<Directory ...>
...
Order allow,deny
Allow from all
# Allow from localhost 127.0.0.1
</Directory>

He was allowing only his own IP to see what was on the server, and an implicit deny statement was after it. Now he went from:
Order allow,deny
Allow from 69.14.54.153
deny from all

to:
Order allow,deny
Allow from all
Deny from all
I would like to thank anyone who even gave me an idea.

I have another request of information:

I would like to host http://www.robocards.org on my computer (since I finally got apache running). How would I go about doing that?

Petey
05-11-2003, 03:32 PM
Originally posted by Raven_Writer
I would like to state that before, anyone else says to install a server o/s like freebsd, or unix, I am not allowed to. This is not my computer, and my parents won't let me install Linux even, which is why I'm screwed on this webserver issue.

Ok.
I understand your predicament, because I have parents who strictly control my computer usage as well.

However, you NEED to talk to your parents about this. Hosting a web server on Windows is like hiring Michael Jackson to be your baby sitter--it's just not the right thing for the job.

Windows is good for some things. However, Web Serving is not one of those.

Take it from me--I work at an ISP doing tech support and computer repairs. Now, I am not a server god. I run my own server, but I know I'm not as knowledgeable as some other people on this forum. But my boss has been with computers since they were invented--he's one of the guys from the original BSD project, I believe--I'm sure that people like Brandon Martus will back me up when I say not to put Windows on your server.

Windows lacks the stability of Unix and it's multi-threading ability. Multithread means that it can do more than one thing at once--with Windows, you don't actually do more than one thing at once. Though it may appear that you are running 5 programs simultaneously, it is not so. Your programs are actually cycling between each other very quickly. Thus, if one freezes, chances are all of them will freeze around this "roadblock" of a sorts.

Unix, with the "top" command, allows you to control separate programs at once, and "kill" them without affecting the other.

Furthermore, I've read reports that when Windows is left running for more than a certain period of time--I want to say 29 days, but I wouldn't swear to it--performance is affected greatly. You begin to experience greater disk fragmentation and there are some freaky things that go on with RAM.

By contrast, there are machines at my job that have been running for a year straight--no restarts, no crashes--using FreeBSD. If they are restarted, it's to upgrade them to the newest version of FreeBSD.

Yes, you can put SQL, Apache, and PHP on windows. However, I believe that you will find it is much, much more trouble than it is worth.

I'll see if I can dig up some reports on actual, documented problems with Windows webserving.

--Petey

Raven_Writer
05-11-2003, 03:42 PM
I've already attempted the talking part. Sooner or later my mom's gonna wipe out the system anyway.

I've been wanting Linux and/or Unix for a while, just for the server reason.

Petey
05-11-2003, 03:49 PM
Originally posted by Raven_Writer
I would like to thank anyone who even gave me an idea.

I have another request of information:

I would like to host http://www.robocards.org on my computer (since I finally got apache running). How would I go about doing that?

I assume you have a static IP on your computer. If not, go to www.zoneedit.com and set up an account with them.

1)Depending on whether or not you plan to host more than one website on your computer, will may or may not want to set up virtual hosts. Virtual hosts allow you to serve several sites off your one computer, usually on the same IP address.

Assuming you have virtual hosts enabled, access either A) httpd.conf or B) vhosts.conf. I don't know your system architecture or how your version of apache works.

You should find a document that says something along the lines of this:

If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.

Once again, configuration will differ depending on how your machine is configured. What you're going to need to do, however, is configure your apache file so that when someone asks for www.robocards.org on your site they are directed to the root folder of robocards, the one where everything is hosted in.

Here's a sample from my server: [quote]
<VirtualHost *>
ServerAdmin admin@peteyproductions.net
DocumentRoot /usr/home/peteyproductions
ServerName peteyproductions.net
ErrorLog logs/peteyproductions.net-error_log
CustomLog /usr/logs/peteyproductions.net-access_log combined
</VirtualHost>

This will send people inquiring for http://peteyproductions.net and peteyproductions.net to the appropriate home folder.

I found that I needed to make a separate vhosts entry for www.peteyproductions.net. I don't know why, and you may not have the same problem. All you can do is test.

2) Access your domain name registrar. Right now, your website's DNS should be pointed to the IP address of whoever you are hosted with. You'll want to switch this over to your IP address, whether static or dynamic. If the latter, you'll have to use www.zoneedit.com. They give you a free five years of use for one domain name. Basically, you download a program from them that tracks your computer and constantly checks your IP address. When someone asks for www.robocards.org, the request goes to your registrar. They send the person to whatever IP address you have entered as your hosting IP address on your DNS panel.

If you have a static address, you have no problem. However, a dynamic address constantly changes. Thus, you can see the problem--if you're address changes, then some days a person asking for robocards.org will be sent to a random IP address.

Once you sign up for zoneedit, you will add them into the equation. Instead of your visitor going request-->registrar-->webhost, they will go request-->registrar-->zoneedit-->webhost. That extra step allows zoneedit to continually be checking your IP address continually be updating the IP address to which it sends requests.

You can check your IP address at www.whatismyip.com.

Hope that helps. But before you start, you need to convince your parents to allow you to change your server to Unix.

--Petey

Petey
05-11-2003, 03:54 PM
Originally posted by Raven_Writer
I've already attempted the talking part. Sooner or later my mom's gonna wipe out the system anyway.

I've been wanting Linux and/or Unix for a while, just for the server reason.

Is this your personal computer? I could understand the fear on the part of your parents if it's the computer you're going to be spending most of your time on and they don't know how to use it.

You can buy another computer for a server. FreeBSD will run on any x86 computer and NetBSD will run on ANYTHING AT ALL.

Actually, you could probably pick up a serving capable computer at an antique shop or a local dump before the next rain. A friend of mine bought 10 old NetBSD compatible macs for $240 the other day. You could get a serving capable computer for well under 100 bucks. --Petey Stephen Kowski 05-11-2003, 03:59 PM Originally posted by Petey Ok. I understand your predicament, because I have parents who strictly control my computer usage as well. However, you NEED to talk to your parents about this. Hosting a web server on Windows is like hiring Michael Jackson to be your baby sitter--it's just not the right thing for the job. Windows is good for some things. However, Web Serving is not one of those. Take it from me--I work at an ISP doing tech support and computer repairs. Now, I am not a server god. I run my own server, but I know I'm not as knowledgeable as some other people on this forum. But my boss has been with computers since they were invented--he's one of the guys from the original BSD project, I believe--I'm sure that people like Brandon Martus will back me up when I say not to put Windows on your server. Windows lacks the stability of Unix and it's multi-threading ability. Multithread means that it can do more than one thing at once--with Windows, you don't actually do more than one thing at once. Though it may appear that you are running 5 programs simultaneously, it is not so. Your programs are actually cycling between each other very quickly. Thus, if one freezes, chances are all of them will freeze around this "roadblock" of a sorts. Unix, with the "top" command, allows you to control separate programs at once, and "kill" them without affecting the other. Furthermore, I've read reports that when Windows is left running for more than a certain period of time--I want to say 29 days, but I wouldn't swear to it--performance is affected greatly. You begin to experience greater disk fragmentation and there are some freaky things that go on with RAM. By contrast, there are machines at my job that have been running for a year straight--no restarts, no crashes--using FreeBSD. If they are restarted, it's to upgrade them to the newest version of FreeBSD. Yes, you can put SQL, Apache, and PHP on windows. However, I believe that you will find it is much, much more trouble than it is worth. I'll see if I can dig up some reports on actual, documented problems with Windows webserving. --Petey problem is with php not with the server OS itself, for me.....php is just not on the same plane as .NET...plain and simple Yes there may be a slight difference in performance, but not enough to notice a major difference. I just can't turn my back on the 16,000 classes that .NET has to work with, and more to come. I think you make a big mistake by overlooking the .NET Framework..... Raven_Writer 05-11-2003, 04:01 PM Originally posted by Petey Hope that helps. But before you start, you need to convince your parents to allow you to change your server to Unix. That'll never work, I've attempted this numerous times. Originally posted by Petey Is this your personal computer? I could understand the fear on the part of your parents if it's the computer you're going to be spending most of your time on and they don't know how to use it. You can buy another computer for a server. FreeBSD will run on any x86 computer and NetBSD will run on ANYTHING AT ALL. Actually, you could probably pick up a serving capable computer at an antique shop or a local dump before the next rain. A friend of mine bought 10 old NetBSD compatible macs for$240 the other day. You could get a serving capable computer for well under 100 bucks.

Yea, it's basically a PC. If I got Linux, I was gonna get the dual-boot version.

This comp. is the only one with internet access, and the other one, I can't even get to.

problem is with php not with the server OS itself, for me.....php is just not on the same plane as .NET...plain and simple

Yes there may be a slight difference in performance, but not enough to notice a major difference. I just can't turn my back on the 16,000 classes that .NET has to work with, and more to come. I think you make a big mistake by overlooking the .NET Framework.....

I hate using anything involving Microsoft. Please tell me the big mistake.

Brandon Martus
05-11-2003, 05:32 PM
Originally posted by Petey
I'm sure that people like Brandon Martus will back me up when I say not to put Windows on your server.

--snip--

Windows lacks the stability of Unix

--snip--

Furthermore, I've read reports that when Windows is left running for more than a certain period of time--I want to say 29 days, but I wouldn't swear to it--performance is affected greatly. You begin to experience greater disk fragmentation and there are some freaky things that go on with RAM.

When we used to use NT Server machines at work, they had to be rebooted nightly. Our FreeBSD & Linux servers now get rebooted for service only, not for guaranteed next-day performance.

Chubtoad
05-11-2003, 06:16 PM
Although it is blatently obvious that Linux/Unix is better for Servers as a rule, running a server on Windows isn't the worst thing in the world. A long time ago i thought, okay i need a computer for linux. Then i rebuilt myself a new one for my desktop and tried to use the old one as a router/multiple server. Unfortunatly it ends up that I can get impatient really fast on some things and just found it so much easier to have all my servers on my Windows machine and have it be my router.

Although it might have its problem, and the computer is generally restarted once every 3 days or so, Having Apache on a windows machine is just fine for a personal website. If I was running any type of site for important things, i would learn the necessary things to setup the correct permissions for everything in linux and find all my equivalent favorite programs. I personally think it isn't worth the effort to setup a linux box just for hosting a personal site.

Once I got all the config files setup correctly, I haven't had to touch them. As long as its Win2k or XP (or some NT based win os) You should be pretty safe. My only mistake was installing Apache2 instead of a version of 1. Now I'm just too lazy to change it cause i think soon enough I'm going to reconfigure a whole bunch of my sytems.

Raven_Writer
05-11-2003, 06:49 PM
Originally posted by Chubtoad
Although it is blatently obvious that Linux/Unix is better for Servers as a rule, running a server on Windows isn't the worst thing in the world. A long time ago i thought, okay i need a computer for linux. Then i rebuilt myself a new one for my desktop and tried to use the old one as a router/multiple server. Unfortunatly it ends up that I can get impatient really fast on some things and just found it so much easier to have all my servers on my Windows machine and have it be my router.

Although it might have its problem, and the computer is generally restarted once every 3 days or so, Having Apache on a windows machine is just fine for a personal website. If I was running any type of site for important things, i would learn the necessary things to setup the correct permissions for everything in linux and find all my equivalent favorite programs. I personally think it isn't worth the effort to setup a linux box just for hosting a personal site.

Once I got all the config files setup correctly, I haven't had to touch them. As long as its Win2k or XP (or some NT based win os) You should be pretty safe. My only mistake was installing Apache2 instead of a version of 1. Now I'm just too lazy to change it cause i think soon enough I'm going to reconfigure a whole bunch of my sytems.
Apacha + PHP + mySQL has been running fine for me on my Windows XP Home, until I shut my comp. down. But, that causes a problem, because this computer is down for most of the week.

Keys
05-11-2003, 10:03 PM
Originally posted by Petey

However, you NEED to talk to your parents about this. Hosting a web server on Windows is like hiring Michael Jackson to be your baby sitter--it's just not the right thing for the job.

Windows is good for some things. However, Web Serving is not one of those.

--Petey

My two cents: For a small personal site like mine, Windows and Apache + PHP is just fine. I've had no problems with it, set up was easy, and I don't have any problems. I don't use this as a hardcore server, (probably couldn't withstand being /.ed :-P ) but for a personal site this set up is fine. Linux or Free/NetBSD might be good for a server that's supposed to be a server....but I'm happy. :-)

Raven_Writer
05-12-2003, 07:39 AM
I'm going to state that my server purposes isn't for a site expecting heavy-heavy doses of bandwidth usage, and traffic. It's just mainly for our team's website.

Petey
05-12-2003, 04:03 PM
Originally posted by Stephen Kowski
pfffft get win 2k3 web server....woohoo iis 6.0 & .NET!!!

A windows server is about as much fun as a good solid kick to the face.

--Petey

Petey
05-12-2003, 04:06 PM
Originally posted by Raven_Writer
I'm going to state that my server purposes isn't for a site expecting heavy-heavy doses of bandwidth usage, and traffic. It's just mainly for our team's website.

Trust me on one thing:

No matter how good your website is, it won't matter if your server is down when people go to look at it.

--Petey

AlbertW
05-31-2003, 05:43 AM
Originally posted by Petey
A windows server is about as much fun as a good solid kick to the face.

--Petey

A windows server may be about as fun as a good solid kick to the face, but it's about as useful as a good solid kick to the balls. :D

edit:

...wait.. that didn't make sense.

IIS sucks. .NET sucks more. end of story ;)