Im trying to achieve the follwoing -
While browsing to my nginx web-server with the following url - http://server/?device=10.10.21.102
I want proxy_pass=http://10.10.21.102 to be set and get the content of 10.10.21.102.
I've managed work it out with $arg_device but when destination page has images it breaks -
[09/Mar/2014:22:08:22 +0200] "GET /welcome.png HTTP/1.1" 500 594 "http://server/?device=10.10.21.102/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; InfoPath.3; Tablet PC 2.0; .NET4.0C)" "-"
When I access http://server/?device=10.10.21.102/welcome.png - I can see the image.
What would be the easiest way to solve this so css,js,images will be called as:
GET /?device=10.10.21.102/welcome.png
and not just
"GET /welcome.png
Thanks!
I've managed to solve this, with nginx_substitutions_filter module (http://wiki.nginx.org/HttpSubsModule)
It's very easily done.
Related
ASP.NET MVC4 web application (shopping cart) is running with mono, apache and mod_mono in Debian.
Sometimes it stops responging or is slow.
Apache acces log file contains parts which may be can used to reproduce the issue:
1.4.24.123 - - [25/Nov/2014:19:50:06 +0200] "GET /store/StoreImage/Thumb?product=350-00315&size=198 HTTP/1.1" 200 5231 "http://www.example.com/store/Store/Details?product=350-00315" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
1.4.24.123 - - [25/Nov/2014:19:50:06 +0200] "GET /store/Image/Icon HTTP/1.1" 200 2721 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
1.4.24.123 - - [25/Nov/2014:19:50:06 +0200] "GET /store/Image/Icon HTTP/1.1" 200 2721 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
etc.
How to send those requests to web site for testing the site from windows ? Is there some free tool or converter which reads apache log file and sends those requests ?
Or how to create MVC4 controller which accepts uploaded this file, parsest it and isses web requests from it to site ? Or is there some web page which can do it ?
Or some testing spidder which invokes all urls from all pages in site rapidly ?
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 23 Jan 2013 05:01:55 UTC
Message: Object expected
Line: 62
Char: 1
Code: 0
URI: http://localhost:4001/abc.aspx?id=12
I am getting this error in every page and specifically in ie8 . My script that is causing the issue is
<script type="text/javascript">DM_redirect("http://mobile.dudamobile.com/site/abc"); </script>
It works perfectly on both Google Chrome and Mozilla
How do i get rid of this issue
The Script being used is this
http://static.dudamobile.com/DM_redirect.js
I had a similar issue some weeks ago. You basically have to specify "javascript" in language because IE8 will read something else.
At last that worked for me.
I'm working on some logging functionality for a website, and I need to update a table with information about the users' browser info. The table was created a while ago by someone else, and I have no idea where they were getting this info. Does anyone recognize this? (each line is a single row)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB0.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; FunWebProducts; FBSMTWB; SIMBAR={8FCFDD51-4B26-489E-A39E-AB2744B
Java/1.6.0_06
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.24 Version/10.53
BlackBerry9630/4.7.1.61 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/105
It's in the HTTP User-Agent header.
Here is the code you would use in ASP.
Dim sAgent: sAgent = Request.ServerVariables("HTTP_USER_AGENT")
For face book and Google Plus I am getting 407 and 403 result code. I used the below URL for generating face book share and Google plus icon
http://www.google.com/webmasters/+1/button/
http://developers.facebook.com/docs/reference/plugins/like/
Can someone suggest me what I am missing
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Thu, 12 Jan 2012 18:20:17 UTC
Message: Object doesn't support this property or method
Line: 4
Char: 1
Code: 0
URI: https://connect.facebook.net/en_US/all.js#xfbml=1
Message: Permission denied
Line: 1
Char: 8164
Code: 0
URI: https://platform.twitter.com/widgets/tweet_button.1324331373.html
The page you are Liking or plus 1'ing probably is not accessible to the linters being used (meaning it is not a public URL). For facebook you can quickly determine the status of your URL by linting it at: https://developers.facebook.com/tools/lint
I'm using the CSS3 ability to apply multiple background images to an element. Currently, I have this code in my stylesheet:
body{background:url("images/emblem.png") top center no-repeat, url("images/background.png");background-color:#EAE6D9}
The code works in all browsers that support it. And those that it doesn't defaults down to the background-color.
However, watching the access log files for the site, I'm noticing 404 errors pop up for, what looks to be, a malformed request based on this CSS initiative. The funny thing is, they are coming from someone using Firefox 5. I'm using Firefox 5 and I cannot get an error to show up in the log for my IP.
Here's the error line from the log:
10.21.7.246 - - [28/Jun/2011:12:02:01 -0500] "GET /templates/images/emblem.png%22),%20url(%22http://ulabs.illinoisstate.edu/templates/images/background.png HTTP/1.1" 404 1005 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0"
I have a feeling the problem is coming from the fact that the " and the space is being URL encoded, but I'm definitely not doing that. And it doesn't happen all the time. Looking at requests from my IP address, the request is properly split up.
10.1.8.129 - - [28/Jun/2011:12:29:33 -0500] "GET /templates/images/background.png HTTP/1.1" 304 - "http://ulabs.illinoisstate.edu/templates/style.1308848695.php" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0"
10.1.8.129 - - [28/Jun/2011:12:29:33 -0500] "GET /templates/images/emblem.png HTTP/1.1" 304 - "http://ulabs.illinoisstate.edu/templates/style.1308848695.php" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0"
Has anyone experienced this behavior before? Or have any ideas on what I might try to resolve the issue?
We've discovered it's YSlow causing the error to be generated. When running YSlow, the error would appear in the log immediately for that IP address. Since this really isn't really a problem, luckily there's nothing we need to fix on our end.