?
Solved

ProxyPass Not show images

Posted on 2011-10-14
7
Medium Priority
?
1,102 Views
Last Modified: 2013-12-16
Hi forum I am redirecting a Web to host internal of my network with proxypass, I access but it does not show the images. I tried with the module  proxy_http_module , but not work .

check my config:

ProxyHTMLEnable On
ProxyPreserveHost on
ProxyPass /stp  http://192.168.15.250/
ProxyPassReverse /stp  http://192.168.15.250/
ProxyHTMLURLMap http://192.168.15.250/

log of my server

 File does not exist: /var/www/vhosts/domain.org.ni/htdocs/images, referer: http://domain.org.ni/stp



any idea?

0
Comment
Question by:rickygm
  • 4
  • 3
7 Comments
 
LVL 16

Expert Comment

by:Blaz
ID: 36973823
Are you (in HTML) including images from absolute path - <img src="/images/xxx" ...>?

If so you should set up ProxyPass for folder /images also.
Alternative option would be to use relative paths to images in the HTML (<img src="../images/xxx").

If you are not using absolute paths could you provide an example of html section - how you include the image and what it was redirected to.
0
 
LVL 3

Author Comment

by:rickygm
ID: 36977693
Hi Blaz

when to make a ProxyPass with images doesn't understand a lot? , in the same code?,  you can give me an example.

regardss
0
 
LVL 16

Expert Comment

by:Blaz
ID: 36977769
I cant give you a solution if you don't answer my question - I just gave a few thoughts on possible cause.

So ARE you using absolute path for images in the HTML?
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 3

Author Comment

by:rickygm
ID: 36980164
nnonuse  relative paths to images in the HTML

I tried with this:

ProxyPass /stp  http://192.168.15.250/
ProxyPassReverse /stp  http://192.168.15.250/
ProxyPass /images  http://192.168.15.250/images
ProxyPass /js  http://192.168.15.250/js
ProxyPass /css  http://192.168.15.250/css


but it does not work, in this virtual server I have another Webs and I put if it this way I they have left in target the pages!
0
 
LVL 16

Expert Comment

by:Blaz
ID: 36984034
Yes that was the idea, but you could add the ProxyPassReverse for those folders as well.

To avoid all this you should proxy the root of your apache server:
ProxyPass / http://192.168.15.250
ProxyPassReverse / http://192.168.15.250

You can combine this with name based virtual hosts:

<VirtualHost 10.10.10.2:80>
        ServerName www.mydomain.com
        ProxyPass / http://192.168.15.250
        ProxyPassReverse / http://192.168.15.250
        CustomLog /var/log/httpd/access_log combined
        ErrorLog    /var/log/httpd/error_log
</VirtualHost>

But it will probably not solve your problems if you have them currently. What error messages are you getting now in the log? You still didn't answer to the question on what URL is requested for pictures, what value is it mapped to on the apache and what is wrong with the resulting URL. You should check your HTML pages and server logs to see that.
If you don't give us additional information or a link to the web site to check some things ourselves then there is not much that we can do...
0
 
LVL 3

Accepted Solution

by:
rickygm earned 0 total points
ID: 37024941
Hi Blaz , it applies to a rule firewall and it redirects by port to the internal web server , it was not exactly it thought as it but I work
0
 
LVL 3

Author Closing Comment

by:rickygm
ID: 37087343
I wanted to make it work with Apache, but I was not able to at the end I make it with iptables
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question