Need info on setting up Apache.

Russ

Lifer
Oct 9, 1999
21,093
3
0
I'd like to move a couple of my low-traffic sites to my own box, so I need to learn Apache in Linux. I've been playing with it a bit, but I'm essentially lost.:D Box is Mandrake.

Looking for recommendations for sites or books (either one is fine, but would prefer a nice book) that have SIMPLE, EASY step-by step instructions for setting up the server. I'm a Linux Zygote, so what is simple to you Linux guys is still way above my head!:)

Any ideas? Thanks!

Russ, NCNE
 

TwoFace

Golden Member
May 31, 2000
1,811
0
0
Russ, I tried setting up Apache on my linux box not that long ago... I just used the program you pointed me at... WebMin! :D

It was done in like five minutes... but then I didn't have to configure it to a specific domain or anything... The way I did it was just install the Apache RPM (I'm using Mandrake as well) and then fire up WebMin and click on Apache... it did a lot of stuff (configuring I guess :p) and then it was ready to go! :D I just had to do one other thing for me to be able to surf it and that was configure the windows box to see that the linux box was part of the IntraNet and not the InterNet... since my linux box is just for local browsing (for the moment at least) I guess you won't have to worry about that;)

Hope you get it to work, and since there are some great guys helping us linux newbies out here I know you will!

Have FUN :D
 

Russ

Lifer
Oct 9, 1999
21,093
3
0
Mindless and LD,

Already been both those places. I need SIMPLE.:) Reading through most of the stuff on the web leaves me lost. I need something that says do A, then B, etc.

TwoFace,

Yep, I have Apache running, and it was Webmin that got me going. I can browse the box from my Windows machines on one IP address, but all I get is the Apache "yes, I'm on here" screen.:) On the other IP address (I have two NICs in the box) I get the dreaded 403. I was getting the Apache screen, but I screwed that up somehow.:)

I'm lost trying to figure out how to setup directories, virtual servers, and how to get past that Apache intro screen. I'm just so confused.:Q

I did just order a couple of books from Amazon.:D

Russ, NCNE
 

loner

Senior member
Oct 10, 1999
380
0
0
Let me think a minute...It's been so long since I last installed Apache on a Linux box (sometime 2 years ago). I did it straight up. Just installed Apache (Debian so used dselect). All of the configuration is in just a couple of config files that are full of examples. I did it by hand rather than webadmin.

In all honesty, with all of the examples in the config files, you may be best off to edit them directly. They were pretty self explanatory (like "add additional virtual directory here", etc...). Look for "httpd.conf", access.conf, etc in the configuration directory of where you installed apache, then edit the files. It will give you a VERY good idea of how apache really works. The good thing is that each part of the config file explains what it does.
 

TwoFace

Golden Member
May 31, 2000
1,811
0
0
Russ,

How to get past that intro screen is REAL easy!

if you read around the default server that WebMin setup for you you'll find references to the directory it serves from... on my box it's /home/httpd/html/ ... what I do is this: I just put a file named index.html in that directory replacing the original one that apache put there... and VOILÁ :D The rest is just the layout of your site...

As for how to get Apache to serve to the other NIC as well I'm not sure at the moment... but I'll check once I get home from work and see if I can work it out... it's probably just one setting somewhere :p

Good luck... and PLEASE let me know how you do it once you get it up ok? since I'm gonna need that info too once I get some kinda "always on" connection ... :)
 

Poof

Diamond Member
Jul 27, 2000
4,305
0
0
Russ - you need to make sure you're editing the files in the correct place... I've found that webmin (since it's essentially a generic, compromise program for all the unixes) sortof assumes where your http stuff is and in reality, it may not be where webmin thinks it is...

If you have Mandrake, you might want to use Midnight Commander (a Norton Commander clone) to actually find where your apache and its config files installed. In many cases, it installs in /home/httpd (where the default page is index.html under /home/httpd/html). In other distros, it might be in /usr/local or whatever...

If you bring up a terminal in your X session, type &quot;mc&quot; in there. This will give you a side by side listing of your files (double pane). Then you can hit <F9>, when the menu comes down, arrow over to &quot;command&quot; and then arrow down to &quot;find file&quot;. In the top line, erase the &quot;.&quot; and replace with a &quot;/&quot;. In the next line, type in &quot;http&quot; before the &quot;*&quot; to have it search for where your http stuff is. In my Caldera Openlinux 1.3, the httpd.conf is in /etc/httpd/apache/conf. In my Mandrake 6.5, it's in /etc/httpd/conf.

The config file is complex but then that's only if you want to get overly fancy with it. Just leave the defaults and enable what you need to enable. It's not much different, complexity-wise, than setting up an IRC server...(an exercise I'm going through right now - har) ;)
 

Michael

Elite member
Nov 19, 1999
5,435
234
106
I bought &quot;Apache Unleashed&quot;. It was pretty decent at explaining everything you need to know about setting up and configuring Apache. What is was missing was an explanation on how to get the files over to to the Linux box once Apache was up and running.

It explained how to use Apache as a proxy server, how to do virtual hosting, redirection, etc. To serve more than one site, you normally would have two instances of Apache running and the book does explain how to do it.

There's a program called &quot;Compache&quot; that's an X-based configuration program just for Apache.

There is a command called &quot;listen&quot; (goes in the config file) that can be used to tell Apache to listen to just one ip address and I'm guessing that it can be set to one nic instead of the other. I'm too green with Linux to say for sure that you can isolate the box from the rest of your net work that way.

My biggest concern would be security. Apache is so common that script kiddies everywhere have exploits that look for &quot;stright out of the box&quot; configurations. You need to lock the Linux box down and surround it with electrified wire.

Michael

ps - As much as &quot;hobbiests&quot; hate to admit it, this might be a good cahnce to call in a professional and get them to set the box up (while teaching you)

pps - Make sure you have the latest version of your files as some older Apache and kernel version have secity holes.
 

linuxboy

Elite Member
Oct 9, 1999
2,577
6
76
Russ, been through all of this.

I also do apache configs for a living so....

just email me if you need help with anything

or I can send you examples of srm.com, httpd.conf and acess.conf files that I have already configured on different servers.


that would save you much grief as all you'd have to do is edit the virtual sites and the main config and the directories.

i can also compile a custom one for ya. check out this latest work

horizonws.net is running Apache/1.3.12 (Unix) mod_ssl/2.6.6 OpenSSL/0.9.5a PHP/3.0.16 mod_perl/1.24 FrontPage/4.0.4.3 on Linux

I didn't throw in servlets/java, but that's pretty dang good.
books can be good but they are sometimes a pain in the arse. It's much easier to go through someone's config files and change them to suit your directory structure/config

well, LMK : )

admin@horizonws.com