When I run ab on a URL with path like
ab -n 500 example.com/page/1?stats=1
I get the message
Benchmarking example.com (be patient)
Does ab only use the domain part of the URL?
and is there a way to benchmark a URL with full path, query params?
Related
My institute recently installed a new proxy server for our network. I am trying to configure my Cygwin environment to be able to run wget and download data from a remote repository.
Browsing the internet I have found two different solutions to my problem, but no one of them seem to work in my case.
The first one I tried was to follow these instructions, so in Cygwin:
cd /cygdrive/c/cygwin64/etc/
nano wgetrc
at the end of the file, I added:
use_proxy = on
http_proxy=http://username:password#my.proxy.ip:my.port/
https_proxy=https://username:password#my.proxy.ip:my.port/
ftp_proxy=http://username:password#my.proxy.ip:my.port/
(of course, using my user and password)
The second approach was what was suggested by this SO post, so in my Cygwin environment:
export http_proxy=http://username:password#my.proxy.ip:my.port/
export https_proxy=https://username:password#my.proxy.ip:my.port/
export ftp_proxy=http://username:password#my.proxy.ip:my.port/
in both cases, if I try to test my wget, I get the following:
$ wget http://www.google.com
--2020-01-30 12:12:22-- http://www.google.com/
Resolving my.proxy.ip (my.proxy.ip)... 10.1XX.XXX.XX
Connecting to my.proxy.ip (my.proxy.ip)|10.1XX.XXX.XX|:8XXX... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required
2020-01-30 12:12:22 ERROR 407: Proxy Authentication Required.
It looks like if my user and password are not ok, but I actually checked them on my browsers and my credentials work just fine.
Any idea on what this could be due to?
This problem was solved thanks to the suggestion of a User of the community AskUbuntu.
Basically, instead of editing the global configuration file wgetrc, I should have created a new .wgetrc with my proxy configuration in my Cygwin home directory.
In summary:
Step 1 - Create a .wgetrc file;
nano ~/.wgetrc
Step 2 - record in this file the proxy info:
use_proxy=on
http_proxy=http://my.proxy.ip:my.port
https_proxy=https://my.proxy.ip:my.port
ftp_proxy=http://my.proxy.ip:my.port
proxy_user=username
proxy_password=password
Every HTTP blog describes what HTTP headers are and what they do... most of it repeatedly copied and pasted ad infinitum... however...
So far, I have failed to find any advice on how to locate these files.
Perhaps the 'hosted site' owner cannot access these files... if so it will save hours of research time if that can be confirmed.
This is what millions of website owners sees in CPanel:
/.lastlogin
/.gemrc
/.contactemail
/.md5sum
/.bash_profile
/.bash_logout
/.bashrc
/.zshrc
/.bash_profile.rpmnew
/public_html
/logs
/.cpanel
/tmp
/.mysql_backup
/.trash
/etc
/access-logs
/.cl.selector
/.cagefs
/.cphorde
/www
/public_ftp
/mail
/.htpasswds
How do HTTP headers fit into this scheme of things?
After I run the test as:
tsung -f test.xml start
I get this:
$ cd /Users/samir/.tsung/log/20160910-1035
Apple-Mac-mini:20160910-1035 samir$ /usr/local/Cellar/tsung/1.6.0/lib/tsung/bin/tsung_stats.pl
creating subdirectory data
creating subdirectory gnuplot_scripts
creating subdirectory images
warn, last interval (2) not equal to the first, use the first one (10)
No data for Bosh
No data for Match
No data for Event
No data for Async
Then, I try to run the local server to see the results:
python -m SimpleHTTPServer 8080
In the browser, if I visit http://localhost:8080, it will redirect to http://localhost:8080/es/ts_web:status which will result into:
Error response
Error code 404.
Message: File not found.
Error code explanation: 404 = Nothing matches the given URI.
However, other reports works fine, like http://localhost:8080/graph.html
Any idea? is http://localhost:8080/es/ts_web:status for the real time status? why I got error 404?
This is right , the tsung_stats.pl script generate report.html file , in the browser, visit http://localhost:8080/report.html, the index.html be created in tsung runtime by ts_controller_sup.beam , the ts_controller_sup.beam listen 8091 port, you need to visit http://localhost:8091/index.html in tsung runtime , you can read the code in ts_controller_sup.erl 100 line
I've a question.
How can I config my nginx for redirecting from url started without hashtags to url started with hashtag. For example "/sign-in" redirect to "/#sign-in". Or "/admin/create" to "/#admin/create".
But I need exclude some addresses, for example, "/api" redirect to "http://someapi.com".
I use windows. Thanks!
Whenever a URL that has %2F which is the hex code for / is posted to my JBOSS Server, I get an error:
HTTP 400 Bad Request error message.
Here is the URL:
http://localhost:8080/application/**abc%2Fhi**?msg=hello"
If I remove the %2F from the URL the link works fine.
This %2F has to be part of the URL and cannot be a request parameter.
Finally figured out the cause of this (both for JBoss and Apache). Both applications intentionally reject URIs with an encoded slash (%2F for / and %5C for \) to prevent possible security vulnerabilities.
Links:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0450
http://securitytracker.com/id/1018110 (Look at section 4. Solution)
And here are the instructions they provide for enabling this behavior in JBoss:
Note: In response to CVE-2007-0450, JBoss AS considers encoded slashes and backslashes in URLs invalid and its usage will result in HTTP 400 error. It is possible to allow encoded slashes and backslashes by following the steps outlined below, however doing so will expose you to CVE-2007-0450 related attacks:
a) If you use the /var/lib/jbossas/bin/run.sh setup, please edit /etc/jbossas/run.conf and append
- -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
- -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true to the string assigned to JAVA_OPTS
b) If you use the init script setup to run multiple JBoss AS services and you wish to allow encoding by default on all services, please edit /etc/jbossas/jbossas.conf and add the line JAVA_OPTS="${JAVA_OPTS}
- -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
- -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"
c) If you use the init script setup to run multiple JBoss AS services and want to allow encoding of slashes and backslashes for a particular service, please edit /etc/sysconfig/${NAME} (where NAME is the name of your service) and add the line JAVA_OPTS="${JAVA_OPTS}
- -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
- -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"
For Apache, it's as simple as setting "AllowEncodedSlashes NoDecode" somewhere in your apache conf or vhost conf (doesn't work in an .htaccess, however).
Apache link: http://httpd.apache.org/docs/current/mod/core.html#allowencodedslashes