[users@httpd] Need help with reverse proxying and image loading

2014-01-26 Thread MM KP
Hello all

I am new to apache & the apache mailing list so PLEASE forgive me for my
long message :


I am trying to configure a nice reverse proxy using Apache. Basically this
is what I want : i want to be able to browse to something like
testproxy.myproxy.com and proxy to www.cnn.com. I want to be able to see
images and i want javascript and css and all that good  stuff loaded as
well. I already created a DNS record for testproxy.myproxy.com and this is
the configuration im using for the virtual host:



   ServerName testproxy.myproxy.com
   ProxyRequests off
   ProxyPass / http://www.cnn.com/
   ProxyPassReverse / http://www.cnn.com/



now when i restart the httpd service (By the way I am using RHEL 6.5), I
can browse to testproxy.myproxy.com but allthat appears in the browser are
text and links. No images are loaded nor any CSS/javascript. What am I
missing in my virtualhost configuration thats preventing me from loading
images? Ive noticed that some of the images on cnn.com are hosted on a
different site such as :

http://i2.cdn.turner.com/cnn/dam/assets/

Im guessing that since the images are hosted in the /cnn/dam/assets/ folder
on i2.cdn.turner.com , and the virtualhost/reverse proxy is only set up to
proxy pass to www.cnn.com , it is not loading images and scripts that are
hosted on http://i2.cdn.turner.com/cnn/dam/assets/. I dont know if i am
even close to being accurate with my assumptions. Apache is a very new
thing to me.


my question is how do I go about configuring my virtualhosts properly so
that every image and script that is on www.cnn.com, will be URL rewritten
as testproxy.myproxy.com/ blah blah blah as opposed to
i2.cdn.turner.com/etcetcetcetc? for example one of the images on CNN's
homepage is:

http://i2.cdn.turner.com/cnn/dam/assets/140123154723-07-super-bowl-prep-bin-tease.jpg

I want to be able to go to a browser, type in testproxy.myproxy.com in the
address bar, proxy to www.cnn.com and when i right click on the image, i
want the FQDN of the image to be something like
http://testproxy.myproxy.com/images/super-bowl-prep-bin-tease.jpg.
Basically i want all URLs to be rewritten as
http://testproxy.myproxy.com/...etc etc etc.

All help is GREATLY appreciated because well, i am totally lost here lol.
Ive done research on using mod_proxy_html and what not, but im still
confused as to how I go about doing this in my situation.

Please assist me!


Thanks!!

SBC


Re: [users@httpd] How to log access to a specific web application ?

2014-01-26 Thread Jeff Trawick
On Sun, Jan 26, 2014 at 1:08 PM, Bruno Costacurta wrote:

>
> Hello,
>
> my Apache server host few applications.
> Meaning something like :
>
> /var/www/A
> /var/www/B
> /var/www/C
>
> I would like to trace access for a specific application, eg. A
>
> Is it possible ?
> Or should I use 'LogLevel info' and so log all applications into
> access.log file (then parsing for specific web page) ?
>
> My config for logging is :
> ..
> ErrorLog /var/log/apache2/error.log
> LogLevel info
> CustomLog /var/log/apache2/access.log combined
> ..
>

Apache httpd 2.4:

LogLevel info


  LogLevel debug http:trace2 proxy:trace2



>
> Thanks for attention.
> Bye,
> Bruno
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/


Re: [users@httpd] How to log access to a specific web application ?

2014-01-26 Thread Igor Cicimov
On 27/01/2014 5:09 AM, "Bruno Costacurta"  wrote:
>
>
> Hello,
>
> my Apache server host few applications.
> Meaning something like :
>
> /var/www/A
> /var/www/B
> /var/www/C
>
> I would like to trace access for a specific application, eg. A
>
> Is it possible ?

Yes if they have separate vhosts. Then in the vhost for the app A you can
put lets say:

ErrorLog /var/log/apache2/error_A.log
LogLevel info
CustomLog /var/log/apache2/access_A.log combined

> Or should I use 'LogLevel info' and so log all applications into
access.log file (then parsing for specific web page) ?
>
> My config for logging is :
> ..
> ErrorLog /var/log/apache2/error.log
> LogLevel info
> CustomLog /var/log/apache2/access.log combined
> ..
>
> Thanks for attention.
> Bye,
> Bruno
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>


[users@httpd] How to log access to a specific web application ?

2014-01-26 Thread Bruno Costacurta


Hello,

my Apache server host few applications.
Meaning something like :

/var/www/A
/var/www/B
/var/www/C

I would like to trace access for a specific application, eg. A

Is it possible ?
Or should I use 'LogLevel info' and so log all applications into  
access.log file (then parsing for specific web page) ?


My config for logging is :
..
ErrorLog /var/log/apache2/error.log
LogLevel info
CustomLog /var/log/apache2/access.log combined
..

Thanks for attention.
Bye,
Bruno

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org