LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-22-2010, 10:47 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
reverse proxy not able to configure properly


Hi, I am using a reverse proxy on Debian Lenny and using apache2.
I have a site and a site
Code:
site1.myserver.com
two files in
Code:
/etc/apache2/sites-available/
site1.myserver.com  myserver.com
myserver.com in /etc/apache2/sites-available/ does not contain any reverse proxy word.
while site1.myserver.com in /etc/apache2/sites-available/
contains
Code:
ProxyPass / http://192.168.2.1
ProxyPassReverse / http://192.168.2.1
where 192.168.2.1 is where site1.myserver.com is present.
But the problem is http://site1.myserver.com and http://myserver.com are both pointing to http://myserver.com
I am unable to find why.I do not want to touch apache2.conf so want to go by having a VirtualHost site1.myserver.com

Last edited by tkmsr; 04-22-2010 at 10:50 AM.
 
Old 04-22-2010, 12:36 PM   #2
edenCC
Member
 
Registered: May 2006
Location: Gz,China
Distribution: RH,FB
Posts: 196
Blog Entries: 1

Rep: Reputation: 32
You probably need to check these settings:

a, Are the two sites enabled?
(create soft links from site-available* to site-enable*)

b, How about the settings in the two virtualhost config files?
Is there any default virtualhost created, are they messing up each other?

c, when myserver.com disabled, how does site1 act?
 
Old 04-22-2010, 12:54 PM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Quote:
Originally Posted by edenCC View Post
You probably need to check these settings:

a, Are the two sites enabled?
(create soft links from site-available* to site-enable*)
a2ensite have done on both.
Quote:
Originally Posted by edenCC View Post
b, How about the settings in the two virtualhost config files?
I could not understand this.
Quote:
Originally Posted by edenCC View Post

Is there any default virtualhost created, are they messing up each other?

c, when myserver.com disabled, how does site1 act?
The site1 acts same as myserver.That means it is not at all reading the configuration created in site1.myserver.com

I removed the entries for site1.myserver.com and www.myserver.com from /etc/hosts
Now I restarted apache2 and I get following
Code:
/etc/init.d/apache2 restart
Restarting web server: apache2[Thu Apr 22 11:37:25 2010] [warn] NameVirtualHost myserver.com:80 has no VirtualHosts
 ... waiting [Thu Apr 22 11:37:26 2010] [warn] NameVirtualHost myserver.com:80 has no VirtualHosts
But it redirected to site1.myserver.com
and I can see myserver.com also.

How did that happened ? I am unable to understand.

If I am doing a ping to site1.myserver.com and myserver.com I am getting both reply from same IP.That is one more thing I observed.

Last edited by tkmsr; 04-22-2010 at 01:46 PM.
 
Old 04-22-2010, 01:49 PM   #4
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Ok by now I specified IP address in sites-available directory for NameVirtualHost and VirtualHost so the above error is also gone.I notice that there is a problem with trailing slash

myserver.com and mydomain.com are both same sites

site1.myserver.com is different from both
if some one points to myserver.com he should see same thing as mydomain.com but this is not happening.
mydomain.com is now redirecting to site1.myserver.com
 
  


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
reverse proxy (HTTP) mapping not working properly noir911 Linux - Server 4 07-28-2009 08:25 AM
configure reverse proxy and apache2 hobbitmage Linux - Newbie 2 07-04-2009 06:21 PM
how to configure reverse proxy using Apache ashok shirke Linux - Server 3 06-16-2008 05:24 AM
LXer: Linux configure pound reverse proxy for Apache http / https web server LXer Syndicated Linux News 0 12-14-2007 08:20 PM
configure reverse proxy in xampp immortaltechnique Linux - Networking 1 09-26-2007 12:07 PM


All times are GMT -5. The time now is 11:33 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