Solved

Errors in configuring Apache -- pls check what's wrong with my configurations.

Posted on 2001-08-25
5
233 Views
Last Modified: 2010-03-04
Hi, experts,

     I tried to configure my Apache (installed together with Linux Redhat 7.1) with the

following steps :-

1. Open the file " /etc/httpd/conf/httpd.conf " for editing
2. I edited the virtual host section with

   <VirtualHost www.owen.com>
   ServerAdmin webmaster@owen.com
   Servername www.owen.com
   DocumentRoot /home/httpd/html/owen
   ErrorLog /logs/owen_error
   CustomLog /logs/owen_access common
   </VirtualHost>

3. Next, on the terminal I typed " /etc/rc.d/init.d/httpd restart "
4. But   Stopping httpd ----- [OK]
            Starting httpd   ----- [FAILED]

Can experts pls tell me what has gone wrong ?
Pls kindly help :)
Thankx
0
Comment
Question by:shchong2
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:gizmola
ID: 6427753
Sounds like you have an error in your httpd.conf file, and apache won't start up in that situation.

You VirtualHost section doesn't look right to me.  Assuming your using Host Header Name, it Looks like you should have (replace 192.168.0.10 with a valid IP for your server):

<NameVirtualHost 192.168.0.10)
<VirtualHost 192.168.0.10>
rest of your settings ok
</VirtualHost>
0
 

Author Comment

by:shchong2
ID: 6428503
Hi, I somehow manage to use Apacheconf to set a virtual host

--> 10.1.1.20 (which is also the ip for my NIC card)
it has its directory under /home/httpd/html/batigol
and manage to access the "index.html" I've created

now my question is
==================
1. when I try to create another Virtualhost say 10.1.1.99
   (I currently only activate one NIC with ip=10.1.1.20)
   when I restart httpd, it failed

   does this mean I can only have one Virtualhost with one NIC card ?

2. if not, how to make more virtual host configured ?

3. this Linux is connected to a LAN
   (this LAN consists of
     -- a Cisco 5505 switch (IP=10.1.1.1)
     -- 4 pc with windows NT (IP=10.1.1.11 to 10.1.1.14)

    But when I try to open Internet Explorer form a pc, say from the pc of 10.1.1.12. In the IE, I type http://10.1.1.20 , but I couldn't access the index.html page. What should I do ?

Pls kindly help
:)
   
0
 
LVL 4

Accepted Solution

by:
gizmola earned 100 total points
ID: 6429159
There are two types of virtual host support, either IP Based or Host Header Name based.

The answer to your question depends on what is available/what you want to do.  If you have IP's to burn, you can make the virtual hosts configuration IP based.  

In order to do that you must have the IP's bound to an interface.  I already explained how you could configure using Host Header names in my previous message.

It appears you are trying to be IP based, using internal non-routable addy's.  In that case, you should have no problem adding as many vhosts as you want, each with a seperate IP.  

However, as you explained, you only have one IP addy bound to the NIC in your Linux server.  You will need to bind additional IP addresses to that NIC before this will work.

How exactly to do this (configure multiple IP's bound to a single NIC) depends on the linux distribution you're using.



0
 

Expert Comment

by:HandyAndy
ID: 6441060
As gizmola said, it does sound like an error in httpd.conf.

You can check the httpd.conf for errors by using "apachectl" (IIRC, it's installed in somewhere like /usr/sbin from the RH RPM.) You use it by typing "apachectl configtest" (without the quotes...). It can also be used to start, stop and restart httpd.
0
 

Author Comment

by:shchong2
ID: 6460249
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now