Solved

I need help with Linux server

Posted on 2014-12-17
2
199 Views
Last Modified: 2014-12-17
Hello,

Our web server hosts a few sites. for example, it host test1.contoso.com, test2.contoso.com, test3.contoso.com, etc. How do I delete test3.contoso.com? It's all hosted on one server which run red hat linux and has apache, mysql, and php running.

Also, is there a way to disable email notification services on the server? I don't want any email coming or redirecting from the server if there is alert/notification setup.

thank you!
0
Comment
Question by:auraria
2 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40505639
In httpd.conf remove the virtual host block
If you can't find it then it is probably being loaded from the sites-enabled folder - check the httpd.conf for any .conf include lines.
Should also remove the DNS entry - how will depend on where your DNS is hosted

disable email notification services
Email from what?
0
 
LVL 12

Accepted Solution

by:
Kent W earned 500 total points
ID: 40505649
To remove from apache, find the <virtualhost></virtualhost> container that defines your "test3.contoso.com" entry, and either REM it out or remove the entry and restart apache.
In RH, this is usually found at
/etc/httpd/conf/httpd.conf
Look toward the end of the config file.

To actually remove the files, (and be careful with recursive removes...)
If the sites files actually live in, say, /var/www/html/test.contoso.com/
then you would issue a remove recursive command -
rm -Rf /var/www/html/test3.contoso.com/

To remove the database, if it's named something like test3_contoso_db, then
run the mysql client (mysql -u user - p password), then when at the mysql cli, do a -
mysql> drop database test3_contosos_db;
(note the semi-colon on the end)

Php is just an interpreter running through apache, so there is nothing you need to do with it.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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