≡ Menu

curl command

HowTo: Nginx Redirect All HTTP Request To HTTPS Rewrite Rules

I have setup nginx as a secure reverse proxy server. How do I redirect all http://example.com/ requests (traffic) to https://example.com/ under nginx web server?
[click to continue…]

Lighttpd: Set Cache-Control: public, max-age Headers For Caching Purpose

I would like to use the Cache-Control header field to specify directives that MUST be obeyed by all caching mechanisms such as a proxy server and browsers. This will help to reduce latency and network traffic for my static assets served by lighttpd web-server. How do I set Cache-Control: public, max-age=SEC using Lighttpd web-server under Unix like operating systems?
[click to continue…]

Linux / Unix Curl: Find Out If a Website Is Using Gzip / Deflate

How do I find out if a web-page is gzipped or compressed using Unix command line utility called curl? How do I make sure mod_deflate or mod_gzip is working under Apache web server?
[click to continue…]

Linux / Unix: curl Command Pass Host Headers

How do I send a header to my Web server (such as Nginx / Lighttpd / Apache / ISS) on a Apple OS X or Unix or Linux based system using a curl command line option for testing and debugging my web apps or server nodes behind a load balancer?
[click to continue…]

Linux / Unix: curl Command Download File Example

I know how to use wget command to grab files. But, how do you download file using curl command line under Linux / Mac OS X / BSD or Unix like operating systems?
[click to continue…]

Linux / Unix curl: Pass HTTP Referer

How do I pass the referrer (HTTP referrer)as an HTTP header field using curl command under Linux OR Unix operating systems?
[click to continue…]

Varnish Change Web Server Signature Headers

I'm using Varnish cache infront of Apache web server and I'd like change my web server signature from

Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.8 OpenSSL/0.9.8g


Apache Web server

How do I change headers using Varnish?
[click to continue…]

I'm behind a squid proxy server. How do I access internet via proxy server when I use wget, lynx and other utilities from a shell prompt on a Linux or Unix-like systems?
[click to continue…]

Fingerprint / Identify Remote Web Server

Q. How do I fingerprint or identify remove web server a from UNIX / Linux shell prompt?
[click to continue…]