Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I have 2 Virtual hosts on my server 192.168.1.90 Configured as follows :

<VirtualHost *:80>
DocumentRoot /home/webmaster/www/PP
ServerName www.pinpin123.com
ServerAlias pinpin123.com

# Other directives here
 </VirtualHost>

<VirtualHost *:80> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName discuss.pinpin123.com
  ProxyPass / http://localhost:8001/
  ProxyPassReverse / http://localhost:8001/
</VirtualHost> 

*Are in separate files in /ete/apache2/sites-available linked to in sites-enabled

The problem is when a client visits pinpin123.com they get redirected to discuss.pinpin123.com

share|improve this question
    
Is there a particular reason why you are trying to proxy to a different port on the same server? That's not really necessary. All you need is to have DocumentRoot directives for the two virtual hosts pointing to the two (different) locations where the files for the two (different) sites are stored. –  Gord Thompson Mar 17 '13 at 7:50
    
A instance of Liquid Feedback is running on port 8001, need to proxy it there. –  BMC Mar 17 '13 at 8:00
    
Your site is down. After you get your site back up, post the rest of your Apache configuration. –  Michael Hampton Mar 17 '13 at 10:36
    
its a local server, not open to internet –  BMC Mar 17 '13 at 11:34
add comment

1 Answer

You can many solution for solve it:

  • using iptables
  • using /etc/hosts
  • using virtualhost according to ip (defining alias ethernet eth:1 eth:2 )
share|improve this answer
    
what should i do, –  BMC Mar 17 '13 at 11:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.