Solved

Configuring Apache -- Step by Step !!!

Posted on 2001-08-21
13
290 Views
Last Modified: 2010-05-18
Hi larry718 and everybody
(sorry if my question sounds stupid)

I'm used to windows, but currently shifting to Linux.
I never use Apache before, but only used Microsoft's Personal Web Server (very simple) to run my .html and .asp scripts.

I read up some documentation about configuring Apache servers. Some teach how to configure using all the command lines. Another teach how to configure using GUI "apacheconf" or "Apache Configuration" to configure.

My questions
============
(1) Is both doing the same task ?
    So which one should I use ?

(2) The documentation with command lines descripts alot
    on certificate, but I don't see any centificate
    configuration on the GUI one ?

(3) I tried out the GUI configuration. When I try to
    access a page locally, it cannot find the host that
    I have set. So, assume I want to have the following
    setting :-

        host name : icel.com
        ip addr   : 10.1.1.20

    can you pls tell me COMPLETE configuration using the
    GUI "apache configurator"
    (My problem is I don't really know what each field
     stands : virtual host, main host, etc... so many)

Pls kindly show me the STEP-by-STEP / COMPLETE configuration for the GUI Apache Configurator

(p/s : I'd encounter many difficulties since my first
       "touch" with Linux.

       It's quite hard to pick-up (unless with some help
       from experts like you guys)

       That's why it SCARED so many newbies away!!!)
 
0
Comment
Question by:shchong2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +2
13 Comments
 
LVL 15

Expert Comment

by:samri
ID: 6408872
shchong2,

Depending on your preference:  I would say that configuring via command line is pretty convenient but easy to make stupid typo-mistake. The GUI is much user friendly, but it take time to familiarize with how the GUI interface works.  When comes to GUI, I personally prefer Webmin (http://www.webmin.com/webmin/)  I contains a lot other tools that you might need to administer you Linux box.

For Q#3, please check you DNS configuration properly, or check your /etc/hosts file.

Do give my suggestion a shot.  Should you need more information, please post more.
0
 

Author Comment

by:shchong2
ID: 6408994
Hi, samri

   I'd download the "webmin-0.87.rpm" onto my Windows system. I wonder how should I transfer it to my Linux pc.

   Any utility that I can make use of ???

:)
0
 

Author Comment

by:shchong2
ID: 6409055
can someone pls help ?

:)
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6410874
See there is ver much difference in apache and pws. The pws can only handle few requests and very light. But Apache is use to run web servers.
So I think you are using linux7.1 The virtual host is that it share the sme computer but the website is different as u use the www.test.com and www.test1.com the main is www.test.com and all the site as virtual host the main host it www.test.com or localhost ok

THE GU I configuration is ver easy. But you have to start the httpd services and see the http://127.0.0.1 it will work. To start httpd just type setup on shell or command prompt and there is services just select httpd service and restart your box it will start working


Harry
0
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6410879
U can see the site
http://www.e-gineer.com/instructions/index.phtml

for all the step by step instruction

Harry
0
 
LVL 4

Accepted Solution

by:
gizmola earned 300 total points
ID: 6415537
Ahh, i noticed several mentions of a command line.  The configuration of apache is based on text based configuration files.  You can pass flags on the command line that affect how the daemon executes, but in general, the main working part, is the config file(s).

The gui config tool just puts in the proper directives into a config file.

I know it at first might look daunting, since there are so many possible setttings, but once you consider it, I don't think it's a big deal, if you're comfortable with .html.

At this point, most people recommend that you configure Apache using a single config file: httpd.conf.

Within that file, you have for the most part a series of directives, which are similar to sgml/xml/html in nature.  The directives implement a sort of scope concept, through nesting.  For example, some directives can be nested (placed inside of) outer tags, thus restricting their meaning to the subset of functionality or security already established in the outer directive.

Consider this illustration:

<Directory /htdocs/www/big-site/gallery>
  <FilesMatch "\.(gif|jpg)$">
    SetHandler /cgi-bin/process-image.cgi
  </Files>
</Directory>

I think it's relatively clear that this set of directives is referring to a particular directory, and setting up .gif and .jpg files to be processed by the process-image.cgi program, even if you haven't fully read the documentation.

So in conclusion, once you can get your head around the fact that the .conf file is full of these directives, I think, it's better to hand edit them, using the apache site as reference, than to use a GUI tool.  This way, the importance of the configuration file is easily understood and de-mystified as well.

When you make changes to it, you need to restart the httpd process, which (on a linux box) is usually best accomplished by running the startup script which lives in the /etc/rc.d/init.d directory and will have the name httpd.

/etc/rc.d/init.d restart usually does the trick.


0
 

Author Comment

by:shchong2
ID: 6416980
I have make sure httpd is running.

I tried out the GUI configuration. When I try to
   access a page locally, it cannot find the host that
   I have set. So, assume I want to have the following
   setting :-

       host name : icel.com
       ip addr   : 10.1.1.20

   can you pls tell me COMPLETE configuration using the
   GUI "apache configurator"
0
 
LVL 4

Expert Comment

by:gizmola
ID: 6418131
Is there a DNS server that resolves icel.com to that IP addy?  If you ping icel.com will you get an answer?  When you say that you can't find the host, this sounds like a DNS error to me.
0
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6427935
EIther you have to configure the dDNS or just put a entry in the host file the example in the host file is given. I don't know the exact location of the HOst file but you can find it but commansd or you can use the find utility in the LInux KDE xserver

Harry
0
 
LVL 1

Expert Comment

by:larry718
ID: 6433760
<<<I'd download the "webmin-0.87.rpm" onto my Windows system. I wonder how should I transfer it to my
Linux pc.

  Any utility that I can make use of ???>>>

Use the Linux box and download it using Netscape.

Also if you have IP problems try installing it under DHCP 1st.  I have setup Redhat 7.1 server with out modifying.
0
 
LVL 15

Expert Comment

by:samri
ID: 6435836
shchong2,

sorry.  kinda tied up for a few days.

If you download it using your windows PC, you can trasnfer it to you Linux machine by ftp, or you can copy the file onto a floppy disk, and transfer it to you linux.  I will find that ftp will be most convenient.  Or as larry718 recommended, try to download it using netscape from your Linux machine.

Depending on which version

http://www.webmin.com/webmin/download/webmin-0.87.tar.gz

If you are running RedHat, get this one.

http://www.webmin.com/webmin/download/rpm/webmin-0.87.rpm

Save it to a directory : /export/packages
an do a

rpm -i /export/packager/webmin-0.87.rpm

To install it. Once done, you can use your browser to browse to :

http://yourserverip:10000/

and use the root id and root password to log in.

any problem, please let us know.


0
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6436321
I think there is a better way to transert file If you are using the fat32 type of filesystem then mount the drive on the Linux PC and u can see all the things in that drive. Just make a folder win in the /mnt and check the drive if it is dev/hda4 then use the command
mount -t vfat /dev/hda4 /mnt/win then press enter

You mount the win drive then access is as usual


Harry
0
 

Author Comment

by:shchong2
ID: 6460251
Sorry I was tied to the "D-link gigabit NIC" problem for sometime

also busy with the ftp problem

not touching apache for sometime, but coming to it now
i guess i should close this question now
but will post new one if I need some more help

one final question if you don't mind :-
========================================
I've switch back to "Redhat 7.0" (for the sake of the d-link gigabit card).
Previously in Redhat 7.1, I've been using "apacheconf" (a GUI Apache Configurator)
Now I couldn't find the "apacheconf" program.

(1)Pls tell me how to know if this program is installed
(2)If not installed, how to get it installed

p/s: I installed all the packages come along with Redhat 7.0 (which took up more than 2 GB of disk space).

:)
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question