logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Two webservers (public and Internal) : A suggestion please Page Previous  1, 2
Author
Marge



Joined: 25 Aug 2009
Posts: 22

PostPosted: Tue 08 Dec '09 15:39    Post subject: Reply with quote

Tryed to add
Code:
RequestHeader    unset  Accept-Encoding

But again, apache does not start...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7445
Location: EU, Germany, Next to Hamburg

PostPosted: Tue 08 Dec '09 16:05    Post subject: Reply with quote

it is not only the RequestHeader I added, I changed more.

However,

- what is in your error.log that apache does not start?
- Do you load the headers_module ?
Back to top
Marge



Joined: 25 Aug 2009
Posts: 22

PostPosted: Wed 09 Dec '09 13:28    Post subject: Reply with quote

I managed to make some progress
Here is what I did:
Downloaded latest iconv.dll, libxml2.dll, zlib.dll (was zlib2.dll, renamed) from http://xmlsoft.org/ and copied in to c:/apache
-copied mod_proxy_html.so, mod_xml2enc.so and libxml2.dll in mod_proxy_html (like the tutorial) and added to httpd.conf
-added

Code:
LoadFile   C:/apache/zlib.dll
LoadFile   C:/apache/iconv.dll
LoadFile   C:/apache/libxml2.dll


and

Code:
ProxyHTMLLinks   a      href
ProxyHTMLLinks   area      href
ProxyHTMLLinks   link      href
ProxyHTMLLinks   img      src longdesc usemap
ProxyHTMLLinks   object      classid codebase data usemap
ProxyHTMLLinks   q      cite
ProxyHTMLLinks   blockquote   cite
ProxyHTMLLinks   ins      cite
ProxyHTMLLinks   del      cite
ProxyHTMLLinks   form      action
ProxyHTMLLinks   input      src usemap
ProxyHTMLLinks   head      profile
ProxyHTMLLinks   base      href
ProxyHTMLLinks   script      src for

ProxyHTMLEvents   onclick ondblclick onmousedown onmouseup \
      onmouseover onmousemove onmouseout onkeypress \
      onkeydown onkeyup onfocus onblur onload \
      onunload onsubmit onreset onselect onchange

ProxyRequests off 
ProxyPass /text http://192.168.1.3/sosiri_txt
ProxyPass /grafic http://192.168.1.3/sosiri_graf
ProxyHTMLURLMap http://192.168.1.3/sosiri_txt /text
ProxyHTMLURLMap http://192.168.1.3/sosiri_graf /graf
<Location /text/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   RequestHeader    unset  Accept-Encoding
 </Location>
<Location /grafic/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   RequestHeader    unset  Accept-Encoding
 </Location>


Unfortunately, from outside it still tryes to connect at 192.168.1.3
Now what I did wrong?


#edit:
I also tryed
Code:
ProxyRequests off 
ProxyPass /text http://192.168.1.3/sosiri_txt
ProxyPass /grafic http://192.168.1.3/sosiri_graf
ProxyHTMLURLMap / /text/
ProxyHTMLURLMap / /grafic/
<Location /text/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   RequestHeader    unset  Accept-Encoding
 </Location>
<Location /grafic/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   RequestHeader    unset  Accept-Encoding
 </Location>


and

Code:
ProxyRequests off 
ProxyPass /text http://192.168.1.3/sosiri_txt
ProxyPass /grafic http://192.168.1.3/sosiri_graf
<Location /text/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   ProxyHTMLURLMap / /text/
   RequestHeader    unset  Accept-Encoding
 </Location>
<Location /grafic/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   ProxyHTMLURLMap / /grafic/
   RequestHeader    unset  Accept-Encoding
 </Location>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7445
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 09 Dec '09 14:01    Post subject: Reply with quote

To analyse and fix your rulesets

Code:

ProxyHTMLLogVerbose On
LogLevel Info   
#or LogLevel Debug


Now examine the apache error log for details of exactly how it was processed.

Do not leave ProxyHTMLLogVerbose On for normal use. Although the effect is marginal, it is an overhead.

----
edit

I'm not sure but IIRC

ProxyPass /text
than
ProxyHTMLURLMap / /text

and if
ProxyPass /text/ http://192.168.1.3/sosiri_txt/
than
ProxyHTMLURLMap / /text/
Back to top
Marge



Joined: 25 Aug 2009
Posts: 22

PostPosted: Wed 09 Dec '09 14:25    Post subject: Reply with quote

With Debug:

Code:
[Wed Dec 09 14:21:02 2009] [notice] Apache/2.2.14 (Win32) proxy_html/3.1.2 configured -- resuming normal operations
[Wed Dec 09 14:21:02 2009] [notice] Server built: Sep 28 2009 22:41:08
[Wed Dec 09 14:21:02 2009] [notice] Parent: Created child process 2248
[Wed Dec 09 14:21:02 2009] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child
[Wed Dec 09 14:21:02 2009] [notice] Child 2248: Child process is running
[Wed Dec 09 14:21:02 2009] [info] Parent: Duplicating socket 204 and sending it to child process 2248
[Wed Dec 09 14:21:02 2009] [debug] mpm_winnt.c(408): Child 2248: Retrieved our scoreboard from the parent.
[Wed Dec 09 14:21:02 2009] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 2248
[Wed Dec 09 14:21:02 2009] [debug] mpm_winnt.c(564): Child 2248: retrieved 1 listeners from parent
[Wed Dec 09 14:21:02 2009] [debug] proxy_util.c(1806): proxy: grabbed scoreboard slot 0 in child 2248 for worker http://192.168.1.3/sosiri_txt/
[Wed Dec 09 14:21:02 2009] [debug] proxy_util.c(1825): proxy: worker http://192.168.1.3/sosiri_txt/ already initialized
[Wed Dec 09 14:21:02 2009] [debug] proxy_util.c(1902): proxy: initialized worker 0 in child 2248 for (192.168.1.3) min=0 max=64 smax=64
[Wed Dec 09 14:21:02 2009] [debug] proxy_util.c(1806): proxy: grabbed scoreboard slot 1 in child 2248 for worker proxy:reverse
[Wed Dec 09 14:21:02 2009] [debug] proxy_util.c(1825): proxy: worker proxy:reverse already initialized
[Wed Dec 09 14:21:02 2009] [debug] proxy_util.c(1902): proxy: initialized worker 1 in child 2248 for (*) min=0 max=64 smax=64
[Wed Dec 09 14:21:03 2009] [info] Child 2824: Accept thread exiting.
[Wed Dec 09 14:21:03 2009] [notice] Child 2824: Released the start mutex
[Wed Dec 09 14:21:03 2009] [info] Child 2824: 64 threads blocked on the completion port
[Wed Dec 09 14:21:03 2009] [notice] Child 2248: Acquired the start mutex.
[Wed Dec 09 14:21:03 2009] [notice] Child 2248: Starting 64 worker threads.
[Wed Dec 09 14:21:03 2009] [notice] Child 2248: Starting thread to listen on port 80.
[Wed Dec 09 14:21:04 2009] [notice] Child 2824: All worker threads have exited.
[Wed Dec 09 14:21:04 2009] [notice] Child 2824: Child process is exiting


But I don't know how to read this Sad(
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7445
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 09 Dec '09 15:03    Post subject: Reply with quote

So here my working config it just tried out with mod_proxy_html-3.1.2 from apache lounge

Code:

LoadFile   bin/libxml2.dll

LoadModule   proxy_module      modules/mod_proxy.so
LoadModule   proxy_http_module   modules/mod_proxy_http.so
LoadModule   proxy_html_module   modules/mod_proxy_html.so
LoadModule   headers_module      modules/mod_headers.so
LoadModule   xml2enc_module      modules/mod_xml2enc.so
ProxyRequests off
ProxyPass /home/ http://192.168.50.5/home/
ProxyHTMLURLMap / /home/
<Location /home/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   RequestHeader    unset  Accept-Encoding
 </Location>


I haven't tried out if the html was rewritten correct, but the reverse pass itself works fine.

---- edit ---

Maybe you can take a look at http://www.apachelounge.com/viewtopic.php?t=3259 There is shown how to access a windows share. Since your server is inside it could be done instead of the reverse proxy.
Back to top
Marge



Joined: 25 Aug 2009
Posts: 22

PostPosted: Wed 09 Dec '09 21:19    Post subject: Reply with quote

You mean no...
Code:
LoadFile   C:/apache/zlib.dll
LoadFile   C:/apache/iconv.dll
?????
And the 2 additional modules placed in modules folder? I'll try.
Thanks for your help.
Back to top
Marge



Joined: 25 Aug 2009
Posts: 22

PostPosted: Thu 10 Dec '09 10:11    Post subject: Reply with quote

The problem was / at the end of the intranet url.
When I add it it it was ok.

Now I have one other problem.
(edited)
Is some possibility to use instead of domain/text/
just domain/text ???

#edit: I think that the problem is from my script. It is ok if I remove the "/" from httpd.conf. Unfortunately, this creates a problem in my script. But that's my problem.
Thanks for your help.
Back to top


Reply to topic   Topic: Two webservers (public and Internal) : A suggestion please View previous topic :: View next topic
Post new topic   Forum Index -> Apache Page Previous  1, 2