LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Personal web server for testing web sites? (http://www.linuxquestions.org/questions/linux-newbie-8/personal-web-server-for-testing-web-sites-367931/)

Ariod 09-28-2005 04:31 PM

Personal web server for testing web sites?
 
Hi,

While I had Windows 2000 I used its Personal Web Server for testing web pages. I now switched to Linux (Fedora Core 4), but I have no clue how to set up something similar to PWS. What's the easiest way?

Thanks in advance.

mjrich 09-28-2005 04:36 PM

Just install Apache. (Though you only need this for dynamic/SSI type-websites -- for static pages there isn't really much point).

Cheers,

mj

jer2eydevil88 09-28-2005 04:41 PM

Apache is the industry standard but it is no small deal to get it configured and working unless you have tons of time to dedicate to it then I suggest you try this out of the box solution.

http://www.aprelium.com/abyssws/download.php

uopjohnson 09-28-2005 05:10 PM

I have to disagree with you on Apache. The package that comes with fedora will probably work very well out of the box and the documentation available on the Apache Site is quite good. This will work for all of your basic straight html hosting, and if you want to get into something more dynamic then you really should work with whatever platform your production server is on.
Fedora folks stop me if I'm wrong but you should just do
Code:

#/sbin/service httpd start
to get apache running.

reddazz 09-28-2005 06:25 PM

Quote:

Originally posted by jer2eydevil88
Apache is the industry standard but it is no small deal to get it configured and working unless you have tons of time to dedicate to it then I suggest you try this out of the box solution.

http://www.aprelium.com/abyssws/download.php

Apache is quite simple to setup and there are numerous tutorials on the web. Its even simpler on distros that provide prebuilt packages, all you have to do is install the apache packages and make sure that httpd is enabled at startup or manually start it when needed.

KimVette 09-28-2005 06:29 PM

Quote:

Originally posted by uopjohnson
I have to disagree with you on Apache. The package that comes with fedora will probably work very well out of the box and the documentation available on the Apache Site is quite good.
I'll second that. Apache is amazingly easy to configure, and tuning it is far easier than tuning IIS.

With IIS you have to deal with the metabase and the utilities to access it are the equivalent of BASIC's PEEK and POKE commands, whereas Apache's .conf files are human-readable at a glance. Some claim Apache configuration is voodoo but that's hardly the case, until you get down to problems like URL Rewriting. But, even when it comes to the more complex stuff, you'll appreciate that in Apache it can all be done in a config or .htaccess file whereas on IIS accomplishing the same would require coding an ISAPI plugin.

Ariod 09-29-2005 08:31 AM

Thanks guys. I followed these instructions on installing Apache, and it works great. I have one more question, though. Suppose I want to have multiple sites to work on. How can I easily switch between them?

tuxrules 09-29-2005 08:58 AM

You should be looking into virtual name based hosting --- Single IP address hosting multiple sites. Here's a great tutorial that I've used before:

http://www.linuxhomenetworking.com/

Scroll down and you'll see a wealth of info...specific details for fedora and redhat.

-Tux,

uopjohnson 09-29-2005 10:23 AM

Don't miss the official apache documentation. It is clear and has examples for virtually any standard task. (Including virtual hosting)
Here

Ariod 09-29-2005 12:31 PM

Thanks a lot guys, but I have just one more tiny problem. One of my web sites uses SSI in a way that the index page includes a htm file, which includes a shtml file. Like this:

The index page has <!--#include virtual="/include/footer.htm"-->, while footer.htm has <!--#include virtual="/inserts/disclaimer.shtml"-->. So basically, the index page calls footer.htm, which calls disclaimer.shtml, which has the final code. (Don't ask me why this was made like this, I'm just maintaining the site.) This will not work on my Apache. Do you have any idea how to fix it?

KimVette 09-29-2005 01:28 PM

Quote:

Originally posted by Ariod
Do you have any idea how to fix it?
Turn on server-side includes in your apache config file.

In other words, make sure your:

Code:

APACHE_MODULES="  . . . . . "
directive refers to the module "include" so you should have:

Code:

APACHE_MODULES="  . . .{other modules }. . include . . {other modules} . . "

Ariod 09-29-2005 02:34 PM

Hmm, where exactly do I find this setting? I've been editing httpd.conf so far, and I can't find it there. By the way, SSI does work, though partially. It doesn't work if a shtml page calls a htm page which calls a shtml file that has the code (that needs to be included in the first page).

KimVette 09-29-2005 04:30 PM

Some distros throw that part of the configuration in /etc/sysconfig where you may find a httpd or apache or apache2 file. YMMV, no warranty expressed, implied, or written, batteries not included, etc. ;)

One thing you could do is grep under /etc for APACHE_MODULES

example:

Code:

you@yourhost:/etc# grep -i APACHE_MODULES -R *


All times are GMT -5. The time now is 05:05 PM.