LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 09-22-2014, 10:25 PM   #1
kribo
LQ Newbie
 
Registered: Nov 2012
Posts: 13

Rep: Reputation: Disabled
Unhappy Apache Proxy Rewrite all links


hello, im new member LQ.

i have a problem with apache proxy.

my scenario is,

- i have webserver in intranet intranet.com and i have example.com webserver to forward all webserver intranet.com .
- my configuration apache is work. all user in internet can access intranet.com via example.com.
- all links on webpage example.com is ready be writen with example.com for example, if int intranet.com have link intranet.com/login.php its already be writen with example.com/login.php

- problem appears when client try to login that web, after user enter username and password the client web browser always attempt to link intranet.com NOT example.com.

here my apache proxy configuration for that web.

Code:
NameVirtualHost *:80

<VirtualHost *:80>
        ServerAdmin admin@example.com

        RewriteEngine On

        RewriteCond %{HTTP_HOST}   !^example\.com [NC]
        RewriteCond %{HTTP_HOST}   !^$
        RewriteRule ^/(.*)         intranet.com/$1 [L,R]

        ProxyRequests Off
        ProxyHTMLEnable On

        ProxyPass /forum http://intranet.com/
        ProxyPassReverse /forum http://intranet.com/
        SetOutputFilter INFLATE;proxy-html;DEFLATE
        ProxyHTMLURLMap http://intranet.com/ /forum/


        ErrorLog "/var/log/apache/rileks-error.log"
        CustomLog "/var/log/apache/rileks-access.log" common

</VirtualHost>
please your advice .
sorry for my bad english.
 
  


Reply



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
[SOLVED] apache rewrite proxy problem deesto Linux - Server 3 10-26-2011 10:00 AM
apache proxy with rewrite problem xiutuo Linux - Server 3 12-01-2010 05:56 AM
Calling all Apache proxy/rewrite gurus viGeek Linux - Server 1 07-27-2010 06:52 PM
How do I get Apache Rewrite to proxy two domains ? anon252 Linux - Server 1 11-28-2008 05:16 AM
apache proxy server rewrite urls slackwarefan Linux - Software 0 10-19-2004 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration