LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-17-2012, 07:08 PM   #31
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled

Thanks for the help, but what I am using are test pages at the moment. So it would be better if I could get mod_proxy_html to work so that things will go well when the front end server is deployed and I may not be around if other servers need to be proxied. I'm willing to put the time in to get it to work!

The html pages are not mine to modify, though I will ask about it!
 
Old 05-18-2012, 02:06 AM   #32
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
you blatantly do not understand what I'm saying. Please re read my comments as you've read them wrong.

look at the html code to see what pages are being requested - you said things were broken, go work out why and how to PROXY so that they are not broken.

do not rewrite the html unless it is UTTERLY unavoidable.
 
1 members found this post helpful.
Old 05-18-2012, 06:22 AM   #33
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
Thanks for your help. I will do just that!
 
Old 05-21-2012, 11:34 PM   #34
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
It works now! All I had to do was put a / after the site names on ProxyPass and ProxyPassReverse in the 000-default file:

<VirtualHost *:80>

ProxyRequests Off

ProxyPass /site1/ http://192.168.0.2
ProxyPassReverse /site1/ http://192.168.0.2

ProxyPass /site2/ http://192.168.0.3
ProxyPassReverse /site2/ http://192.168.0.3

The problem I am now having is how to make it so that you can enter in the url as http://192.168.0.2/site1 without the final /.

http://192.168.0.2/site1 will not load the page but http://192.168.0.2/site1/ works perfectly when entered in a web browser to reach the site.

How can I make this work?

---------- Post added 05-21-12 at 11:35 PM ----------

Starting new thread
 
Old 05-22-2012, 02:14 AM   #35
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
well don't require the last / in the ProxyPass request of course!


ProxyPass /site1 http://192.168.0.2
 
1 members found this post helpful.
Old 05-22-2012, 02:38 AM   #36
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
Using the following configuration the server still doesn't return the images when the final "/" is left out of the url in a web browser. When the final "/" is included images load fine.

This is what I have configured in 000-default now:

<VirtualHost *:80>

ProxyRequests Off

ProxyPass /site1 http://192.168.0.2/
ProxyPassReverse /site1 http://192.168.0.2/

ProxyPass /site2 http://192.168.0.3/
ProxyPassReverse /site2 http://192.168.0.3/
 
Old 05-22-2012, 02:45 AM   #37
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
where did images come into the equation? as above, if you just have issues with individual objects on a page, look at the source to see what's being requested for more information to help you.
 
1 members found this post helpful.
Old 05-22-2012, 07:19 AM   #38
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
All I want to do is make it so that if I don't include the "/" at the end of the address when entered in a web browser, I'll still get the page to display. When the "/" is included at the end it works perfectly! Images load just fine.

192.168.0.2/site1 = No Images
192.168.0.2/site1/ = Images

Why? This is the only problem I'm having. I don't see what looking at the html will do for me considering it works when the "/" is included at at the end of the url.

Sorry!
 
Old 05-22-2012, 07:40 AM   #39
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
I have an html doc that points to these links without problem. It is the index.html file.

<a href=http://192.168.0.2/site1/>Site1</a>
 
Old 05-22-2012, 07:52 AM   #40
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
FQDN's in the code? Yuck!

It's very unclear what is not working, one minute it's the "page" and then it's "images". if you have a page and the *PAGE* has successfully loaded, but you have broken content on the page, then clearly there is a difference between how you're calling the page, and how the page is referring to the images.

Where you have no images, I would guess that if you look at the code you'll see something like "<img src=bob.gif />" And in this case, the request that ends up going to the back end server would be site1bob.gif compared to site1/bob.gif. Does this finally show why you should be actually LOOKING at what is being requested?? Are you looking in the log files on the back ends to see a pile of 404s?
 
1 members found this post helpful.
Old 05-22-2012, 10:29 AM   #41
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
The problem that I am currently having is that the images on the page only load when the url is typed in as http://192.168.0.2/site1/ and not http://192.168.0.2/site1. Everything else is working perfectly. I created an index.html file that points to these FQDNs with the full url, and that works perfectly. All I have to do is type http://192.168.0.2 into the web browser and I can reach each site without trouble using links.

I would like to be able to reach these sites by typing http://192.168.0.2/site1 into the web browser. This will not work. Only when I enter http://192.168.0.2/site1/ into the web browser does it work. I don't understand why?

This is one of the Image file I am trying to get to work:
<img name='rtmc_image' alt='rtmc_image' src='.?command=Image&screen=Current' border='0' usemap='#imagemap'>

I just don't understand. Even if I knew what was being requested, I wouldn't know what to do with it...

Ignore everything else I have posted in this thread!!

Sorry for the trouble!!
 
Old 05-22-2012, 01:02 PM   #42
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
This?..

Name:
/?command=Image&screen=Current&image_id=1337709327980

Method:
GET

Status:
200
OK

Type:
image/jpge

Initiator:
rtmc.js:36

Size:
110.57KB
110.28KB

Time:
679ms
27ms
 
Old 05-23-2012, 01:57 AM   #43
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
right, so "src=.?command=Image&screen=Current" leads to a request for either http://192.168.0.2/site1/.?command=Image&screen=Current OR http://192.168.0.2/site1.?command=Image&screen=Current the latter of which is therefore illegal as I suggested.

Sticking with ProxyPass only, just put both in:

Code:
ProxyPass /site1/ http://192.168.0.2/
ProxyPassReverse /site1/ http://192.168.0.2/

ProxyPass /site1 http://192.168.0.2
ProxyPassReverse /site1 http://192.168.0.2
they are used in the order that they are listed, so requests for just "/site1" will match the second, others will match the second.

Alternatively, you can try a little bit of mod_rewrite:
Code:
RewriteRule ^/site1$ /site1/ [R]

ProxyPass /site1/ http://192.168.0.2/
ProxyPassReverse /site1/ http://192.168.0.2/
before the proxypass
so when a request for just the /site1 uri comes in, apache adds a slash and then off it goes to the other server with a slash on the end.
 
1 members found this post helpful.
Old 05-23-2012, 05:12 PM   #44
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
Thanks again for the help. The first example didn't work for me though and I don't have mod_rewrite. I tried to enable it with a2enmod mod_rewrite, but it says it doesn't exist. What would I have to download?

I'll keep working on it.
Thanks!
 
Old 05-24-2012, 02:07 AM   #45
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
You really don't have it? It's a totally standard apache module, a normal install always has it. It's probably not enabled by default, but it really should be there.
 
1 members found this post helpful.
  


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
[SOLVED] iptables 192.168.1.x server, can't ping by 192.168.0.x momok Linux - Security 2 06-02-2011 01:32 AM
[root@wlxxb ~]# telnet 192.168.192.12 25 Trying 192.168.192.12... telnet problem cnhawk386 Linux - Networking 1 10-10-2007 02:50 PM
pinging 192.168.0.10 from 192.168.2.101 cov Linux - Networking 12 05-03-2007 10:21 AM
What route to access daisy chained 2d router 192.168.1.1 after 192.168.0.1 (subnets?) Emmanuel_uk Linux - Networking 6 05-05-2006 01:47 AM
Is someone on my network?! ::ffff:192.168.0.10:ssh ::ffff:192.168.0.:38201 ESTABLISHE ming0 Linux - Security 4 04-12-2005 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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