Tag Info

Hot answers tagged

10

The documentation states that add_header "Adds the specified field to a response header provided that the response code equals 200, 204, 206, 301, 302, 303, 304, or 307. A value can contain variables." So it doesn't work with a 502. I forgot to add that you can use the third party headers more module to add headers to other codes. You'll probably have to ...


7

When you enter a URL without a port, port 80 is implied. No browser that I know of has any way to change this behavior; if you want to use port 3333, then you'll need it in the URL.


6

The FOOBAR in %{FOOBAR}e should be an environment variable, but HTTP_HOST is a server variable. If you really want to do that, you may try: RewriteRule (.*) $1 [E=custom_host:%{HTTP_HOST}] RequestHeader set X-Custom-Host-Header "%{custom_host}e" or RewriteCond %{HTTP_HOST} (.*) RewriteRule (.*) $1 [E=custom_host:%1] RequestHeader set ...


6

Yes you can very well hash any header of your choice. Just use "balance hdr(header_name)". I must say I had never thought about doing it that way. In some environments, it can indeed be quite useful. You can also hash on a URL parameter or a POST parameter if that can help. You can't define your hashing method however. You can select if the hash is ...


5

SPF shouldn't be causing a header to be added. Something else should be doing this. Look at your headers for some segment where there are lots of lines in a row which are indented (continuation lines). This will be your problem header. As you are using ~all, your SPF record won't be that effective. You are better off coming up with a policy which wil ...


5

Since Nginx 1.7.5 you can use always to add a header irrespective of the response code: add_header X-Test "blahblahblah" always;


4

If you want to add headers then you want something like this: server { listen 80; server_name _; add_header X-Frame-Options "SAMEORIGIN"; add_header X-Frame-Options sameorigin; add_header X-UA-Compatible "IE=Edge,chrome=1"; add_header X-Your-Port-Header-Here $server_port; add_header X-Your-Protocol-Header-Here $scheme; ...


3

Some additional clues According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5: identity The default (identity) encoding; the use of no transformation whatsoever. This content-coding is used only in the Accept- Encoding header, and SHOULD NOT be used in the Content-Encoding header. Akamai seems to be ignoring the fact that a server ...


3

You do not need the full verbose list of all mail exchangers - You probably have a higher-than-necessary level of debugging set somewhere that is causing some part of your mail chain to include this. Determine which part of your mail chain is adding this header. Then make it stop. :-)


3

in case you do not get any response body in your logs when using "Intended Response Body (E)"; eg.: SecAuditLogParts ABCEFHZ Make sure you also have activated the rule engine: SecRuleEngine On and check your settings for: SecRequestBodyAccess On SecResponseBodyAccess On


3

Bad news! mod_headers in 2.0.59 doesn't seem to play nice with environment variables in its validation code. It parses like this: RequestHeader {action} {inhdr} {value} {envclause} For unset, 2.0.59 validates like this, scrapping a directive if it has a third argument (value) after the directive name: if (new->action == hdr_unset) { if (value) ...


3

What you want to use is the header_checks rules. You will need to tweak this for your particular servers but this is an example: /^Received:.* \[127\.0\.\.0\1\]\) by \S+\.server\.com \(Postfix\)/ IGNORE See http://www.postfix.org/header_checks.5.html for more details and options. See for an example post from someone doing the same thing: ...


3

That looks like it might be an IPv6 address, though it's difficult to tell since you have mangled it.


2

This answers your exact question: http://hoursofop.tumblr.com/post/17760274650 It applies to a Ubuntu system and worked perfectly for me. Be careful to choose the right "smtp" line in master.cf. I used a tab to indent the -o line. Also note that SendGrid strip out the X-SMTPAPI header from the email before it is sent on - so you won't find it there but you ...


2

As per the Squid FAQ: Squid.conf ACLs Header modification via Squid ACLs is limited to deleting a header or replacing a matching header with a constant string. In other words, you won't be able to add arbitrary request headers simply by using Squid ACLs. The Squid ACLs limit you to deleting existing headers or replacing existing headers, but ...


2

This should mostly just be a matter of making sure that your modules and settings match between the two servers. Run a2enmod deflate on the server that's not compressing to make sure the module's enabled, then check to be sure the configurations match (server config in apache2.conf, site config in sites-available, and module config in ...


2

You can do this via mod_security: Keyword "audit logging": http://www.modsecurity.org/documentation/modsecurity-apache/1.9.3/html-multipage/07-logging.html


2

The IPv4 header contains total length, which is the total length of the packet including header. The IPv6 header contains payload length, which is the length of the actual payload not including the header. Since both are 16-bit unsigned integers, the IPv6 packet can contain in it's payload an entire IPv4 packet including header, so the IPv6 packet can handle ...


2

The end user is forwarding their email via the MTA (like /etc/aliases).


1

Solved - Following line in /etc/postfix/master.cf was causing conflict : pickup fifo n - - 60 1 pickup -o content_filter= # -o receive_override_options=no_header_body_checks //commented this line out


1

I have a configuration similar to this one and it works use_backend webcams if { hdr(host) -i webcams.XX.YY webcams.YY.ZZ } use_backend spain if { hdr_dom(host) -i TT.es } default_backend DEFAULT Note that this config parses the "Host" header in two different ways: exact host name and domain only, always ignring the case. Idea: are you parsing the ...


1

You need to modify your mime.types file not your httpd.conf file. Add (or modify) the following line to your mime.types file and restart Apache. audio/mpeg mpga mp2 mp3 See this post about for an example mime.types file that should cover all of your application's needs.


1

If you want cache responses in memcached you have to store your information in it manually by using something like a script. Nginx is not web accelerator like squid or varnish if you need that functionality out of the box take a look at varnish. It is working perfectly with nginx also.


1

As stated by David, your question is very broad. However, after having tried to read your mind, it seems to me that what you want is to use the HTTP caching features. I believe you want the users's browsers accessing your web site to cache its images as well as its .css files, so that they avoid fetching all this content every single time they access your ...


1

Caching is rarely a 'drop in' solution, but if implemented correctly it can result in a significant speed increase for a website. The first item you mention 'a lot of CSS images' - is not a server issue per se. To fetch those, the browser must make a request for each image, each with its own overhead. Combine the images into a CSS sprite so that you can ...


1

Do you can with new Squid 3.3 that support the command "request_header_add". I used CentOS for do it. My Squid.conf is: acl CONNECT method CONNECT visible_hostname MySERVER.local acl local src 192.168.0.0/24 http_access allow local ssl_bump client-first all always_direct allow all http_port 3128 ssl_bump generate-host-certificates=on ...


1

Using squid, you will: Set up dyanmic SSL certificate generation. Install the root certificate in the web clients' browsers. Set up SSL Bump to intercept proxied SSL/TLS traffic. Use ACLs to insert your desired header(s).


1

Take a look at C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment variables: export C_INCLUDE_PATH=/usr/local/include/:${C_INCLUDE_PATH} export CPLUS_INCLUDE_PATH=/usr/local/include/:${CPLUS_INCLUDE_PATH}


1

You should be able to access it like so: subdomain.domain.com:3333 Furthermore, you could set up an alias on your domain controller to access it with a friendlier URL, saving colleagues from having to remember port numbers and whatnot. Note that this most likely belongs on the Server Fault Stack Exchange site, I have voted to migrate it there for your ...



Only top voted, non community-wiki answers of a minimum length are eligible