LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-25-2011, 02:12 AM   #1
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 36
An Apache related query


I have a query related to GET requests:

Main site name: rf.com (for example).

subdomain sites: a.rf.com, b.rf.com, c.rf.com, etc.

Web server: Apache.

All the above-said sites run in the same server via virtual hosting.

My question is as follows:

Suppose I disable the site c.rf.com. Now, when someone access the site c.rf.com, it will go to the default site a.rf.com (by means of the alphabetical order priority). Also, if the user types c.rf.com/home/somepage.php, there will be a log in /var/log/httpd/c.rf.com_access.log will have this entry and as well as the corresponding app's log will also be filled with this error.

Is there a way (without changing the DocumentRoot of c.rf.com to point to some index.html with "site is disabled" information), in which I can configure a.rf.com's virtual host that if a page is not relavent then not go to the app's log, but provide a suitable message...?

Please let me know in case I am not clear to you.

Thanks

saagar
 
Old 03-25-2011, 02:23 AM   #2
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 36
Hi,

I think what I need is something like this:

A RewriteRule that will compare the sitename (ServerName) with the incoming request sitename and if both are same then allow it, else go to an index page, saying "not found", so that it wont go to the app and fill it will log entries.


Thanks
saagar
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Xterm related query mr.blacklisted Linux - Server 1 11-17-2010 09:36 AM
Query related to syslog? your_shadow03 Linux - Newbie 5 05-15-2009 10:32 AM
A Query related to Git? your_shadow03 Linux - Newbie 10 04-23-2009 11:35 PM
Query related to sudo? your_shadow03 Linux - Newbie 2 04-22-2009 12:21 AM
shell related query !!!!!!!!!!! iacharyya Linux - General 10 06-09-2008 06:39 PM


All times are GMT -5. The time now is 09:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration