Solved

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

Posted on 2001-08-25
5
237 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DNS Question 7 69
Use of SSL Certificates - http vs https 3 81
Logs to delete in Windows VCenter server ? 11 769
Apache/PHP: Cannot make phpinfo() and phpmyadmin work 4 57
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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