0

I need to point domain.com/chat to chat.domain.com. So, when I access domain.com/chat I want to see the same thing as when I access chat.domain.com.

My virtualhost for this looks like below. As you can see I have tried doing it with proxypass, but I think I am doing something wrong.

 ServerAdmin info@domain.com
 DocumentRoot /var/www/domain.com
 ServerName domain.com

 ErrorLog /var/log/apache2/domain.com-error_log
 CustomLog /var/log/apache2/domain.com-access_log combined


 ProxyRequests Off
 ProxyPreserveHost On

 <Proxy *>
    Order deny,allow
    Allow from all
 </Proxy>

 ProxyPass /chat http://chat.domain.com/chat
 ProxyPassReverse /chat http://chat.domain.com/chat

 <Location /chat>
    Order allow,deny
    Allow from all
 </Location>

 <Location />
    Order allow,deny
    Allow from all
 </Location>

  <Directory /var/www/domain.com>
      Options FollowSymLinks 
      AllowOverride All
  </Directory>

</VirtualHost>
George
  • 101
  • 2
  • *I have tried doing it with proxypass, but I think I am doing something wrong* : The ProxyPass directive seems OK if chat resides in `chat.example.com/chat` so what **evidence** do you have that things are not working as intended or expected? – HBruijn Feb 16 '15 at 10:41
  • chat resides in `chat.example.com/`. `example.com` is running a Wordpress website. So, the evidence is that when I access `example.com/chat`it shows me the WP website with a Page Not Found. – George Feb 16 '15 at 10:46
  • Then for starters try to set your proxy directive to the correct location: `ProxyPass /chat http://chat.example.com/` – HBruijn Feb 16 '15 at 10:49

0 Answers0