location of virtual domains/directories on apache web server( Red Hat 7.2)

Hi Experts,
We have been providing web-hosting support to few of our clients and I was trying to locate the server name and document root  in Virtual Hosts section of httpd.conf file and couldn't find anything. However, the default path for all existing virtual domains is set to /usr/local/apache/htdocs. Is there any other location where the settings for Virtual Domains be stored ? Actually, I want to add  one client and delete the services for one existing account and  so, in a fix ...
mn210Asked:
Who is Participating?
 
blklineCommented:
That's pretty simple:

Locate the document root for the client.  You'll want to delete that directory.
Delete all of the contents of the .conf file between <VirtualHost> and </VirtualHost>
Delete logs, if they are specific to that domain.
Remove the client's domain from your DNS, wherever that happens to be.
Restart httpd.

 <VirtualHost 192.168.1.20:80>
        ServerAdmin root@localhost
        DocumentRoot "/var/www/doc"    <-------------    this line contains the document root
        ServerName doc.mydomain.net     <-------------    this line contains the server name
        ServerAlias doc                                 <-------------    this line is basically an "a.k.a"
        ErrorLog logs/doc.mydomain-error_log
        CustomLog logs/doc.mydomain-access_log common
        <Files "*.docmgr">
                Order allow,deny
                Deny from all
        </Files>
</VirtualHost>
0
 
blklineCommented:
<VirtualHost 192.168.1.20:80>
        ServerAdmin root@localhost
        DocumentRoot "/var/www/doc"    <-------------    this line contains the document root
        ServerName doc.mydomain.net     <-------------    this line contains the server name
        ServerAlias doc                                 <-------------    this line is basically an "a.k.a"
        ErrorLog logs/doc.mydomain-error_log
        CustomLog logs/doc.mydomain-access_log common
        <Files "*.docmgr">
                Order allow,deny
                Deny from all
        </Files>
</VirtualHost>
0
 
troopernCommented:
Is your V-Hosts in your httpd.conf or in a vhosts.conf file ?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
mn210Author Commented:
I have checked the contents of  httpd.conf file and there is no entry for V-Hosts . Moreover, I have  checked the /etc/httpd/conf directory and all /etc directory and couldn't find vhosts.conf file.
0
 
blklineCommented:
I think he meant VirtualHost.

Do you have anything in /etc/httpd/conf/httpd.conf that looks similar to what I posted?
0
 
mn210Author Commented:
Below is the segment of Virtual Host section of httpd.conf file :
 ------------------------------------------------------------------------------
#NameVirtualHost *

#
# VirtualHost example:

# Use name-based virtual hosting.
#
#NameVirtualHost *
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

#<VirtualHost _default_:*>
#</VirtualHost>
-------------------
SSLLog      logs/ssl_engine_log
SSLLogLevel error

</IfModule>

<IfDefine HAVE_SSL>

##
## SSL Virtual Host Context
##

<VirtualHost _default_:443>

#  General setup for the virtual host
#DocumentRoot "/etc/httpd/htdocs"
#ServerName new.host.name
#ServerAdmin you@your.address
ErrorLog logs/error_log
TransferLog logs/access_log
-----------------------------------------------------------------------------------------
0
 
blklineCommented:
And you currently are hosting multiple domains?  What you have here definitely does not specify virtual domains.

What does this command return?

ls -l /etc/httpd/conf.d/
0
 
blklineCommented:
Also, please post the following:

grep "<VirtualHost" /etc/httpd/conf/httpd.conf
0
 
mn210Author Commented:
Yeah ! We are currently hosting three domains.

Here is the output  of the commands -
[shar@abc /etc]$ ls -l /etc/httpd/conf.d/
ls: /etc/httpd/conf.d/: No such file or directory
-------------------------
[shar@abc /etc]$ grep "<VirtualHost" /etc/httpd/conf/httpd.conf
# ports, in addition to the default. See also the <VirtualHost>
# See also the <VirtualHost> and Listen directives.
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
# All of these directives may appear inside <VirtualHost> containers,
# If you do not specify an ErrorLog directive within a <VirtualHost>
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# If you do not define any access logfiles within a <VirtualHost>
# define per-<VirtualHost> access logfiles, transactions will be
#<VirtualHost *>
#<VirtualHost _default_:*>
<VirtualHost _default_:443>
______________________
0
 
mn210Author Commented:
Still looking for help ....
0
 
blklineCommented:
I was on vacation for a week and have been playing catch up... sorry for the delay.  

Would you be willing to post your httpd.conf file?  Use this command to strip out most of the junk:

cat /etc/httpd/conf/httpd.conf | sed -e '/^[ \t]*#/d' -e '/^$/d' > post_this.file

Also, please do:

ls -l /etc/httpd/conf.d

If you don't want to post this directly to the list then send just the httpd.conf file to:

   blkline at attglobal dot net  

and I'll post the salient points of it back with the answer... if I can find it in what you have provided.
0
 
mn210Author Commented:
As per your suggestion , I sent the httpd.conf file at your email address.
Further, I want to delete the account (web-hosting) for one of our clients? Can you please walk me thr' the steps  ?
0
 
blklineCommented:
Got your file and there isn't anything in there to define your virtual hosts.  Which leads me to believe that the config file is elsewhere.  Please post the results of the following commands  (as root):

ps uxwwa

and

locate httpd.conf
0
 
mn210Author Commented:
Thanks a lot , it worked !!!
I got the location of httpd.conf and it  is /usr/local/apache/conf directory and also got Virtual Host domains.

Further, I want to delete the account (web-hosting) for one of our clients? Can you please walk me thr' the steps  ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.