The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
3answers
296 views

How do I create a custom header from an existing SSL environment variable?

OK I have spent all day on this-- I'm using apache with mod_ssl I'm trying to take an existing environment header, "%{SSL_CLIENT_S_DN_CN}s" which looks like "Lastname Firstname Mi username" and set a ...
2
votes
2answers
638 views

Apache2 merge multiple Set-Cookie headers

We have a server running varnish. In order that it works correctly with Magento it analyses whether a Set-Cookie: EXTERNAL_NO_CACHE=1 header is passed through. Only problem is that we have several ...
2
votes
1answer
392 views

Apache serving empty gzip with assets produced by Rails Asset Pipeline

I followed the steps described in the blogpost The Asset Pipeline, from development to production and tweaked them to my environment. The two important files are: ...
2
votes
0answers
252 views

Add a header depending on the proxied response code with apache

I use Apache 2.2 with mod_proxy to some 3rd party HTTP server. As it doesn't send any Cache-Control header, I want to add one of 1 day for response code 200, 5 min for 404 and 0 for any other ...
1
vote
1answer
256 views

Apache: Set global headers only if not already set

I am having a little annoying situation here. I have a server managed by plesk. In the /etc/apache2/apache2.conf mod_headers and mod_expires based configuration takes place. For example: ...
1
vote
1answer
2k views

Can Apache rewrite a request's Host header based on the URL?

Apache is a reverse-proxy to my app. A client requests http://cdn.example.com/foo/images/logo.png: GET /foo/images/logo.png HTTP/1.1 Host: cdn.example.com I want Apache to modify the request so ...
1
vote
2answers
70 views

Possible to modify host in headers [duplicate]

Whenever someone visits intern.old-company-name.example.com I would like it to get redirected to https://intern.new-company-name.example.com. One way to do it would be <IfModule mod_rewrite.c> ...
1
vote
1answer
79 views

Why are http headers not set when I use proxypass on apache2.2

I have an apache2.2 server with mod_proxy and mod_headers installed. On a request running with a ProxyPass directive, none of the Header set directives work, ie the header's aren't set in the ...
1
vote
1answer
798 views

mod_headers not sending headers when file is PHP

I've got my .htaccess file set to the following: Header set MyHeader "I'm Set!" If I go to that directory (http://example.com/test/), which has no default index file, and view the network activity ...
1
vote
0answers
39 views

Apache: Add header to one specific url?

I just configured some Content negotiation for my root url based on this Apache Document and it seems to work great. As my site also set a language cookie, I tested the following in my virtualhost ...
1
vote
1answer
71 views

Apache2/mod_wsgi mod_headers issue

I'm running mod_wsgi on Ubuntu Server 12.04 with Django, but I can't seem to get mod_headers working. I've run a2enmod headers, and got the response that I need to restart apache for it to work, which ...
1
vote
1answer
208 views

Apache over-caching JS/CSS/images

We have a problem with JS and CSS files being cached for far too long by the browser. We do frequent development, and whenever we push out a change it breaks for some users who have the old version ...
1
vote
3answers
341 views

.htaccess “Header set” not working for text/html

I have a folder with this file: channel.html In the same folder I have this .htaccess file <Files channel.html> ExpiresActive On ExpiresDefault A31536000 Header set Cache-Control ...
1
vote
1answer
358 views

mod_headers not working for php + mod_fastcgi pages

I'm running PHP through mod_fastcgi & mod_suexec, and I added Header set X-UA-Compatible "IE=edge env=best-standards-support" to my .htaccess file. It works fine for static content, but the PHP ...
0
votes
2answers
237 views

Set header for certain file types using Apache2 mod_headers

I'm trying to use mod_headers to set a header for certain file types. Specifically, I want to set Access-Control-Allow-Origin to "*" for ttf files. Is there a rule I can add to my VirtualHost that ...
0
votes
1answer
44 views

Apache reverse proxy logic based on arbitrary header

I have apache running on a natting fw, that authenticates, reverse proxies, and provides an ssl wrapper for 2 webapps on the back end. This works with virtual hosting and proxies back based on the ...
0
votes
2answers
429 views

how can %{BALANCER_WORKER_ROUTE}e be null

I'm trying to set up a balanced cluster with mod_proxy_balancer. I followed the example line from here to set a cookie. I have had to tweak it as the environment is not stable so not every request ...
0
votes
1answer
2k views

Apache: “Header set Server” not working

I'm trying to do something I thought was simple. I just want to change the Server header that Apache sends for every request. This is the line in my httpd.conf file: Header always set Server "My ...
0
votes
1answer
36 views

Using mod_headers to override mod_alias

I am trying to use mod_headers to change Location headers that are being sent via the mod_alias using the Redirect directive but none of them are being re-written. I have the following in my ...
0
votes
1answer
206 views

Add a request header on mod_proxy based on the value of another request header

I have a server running mod_proxy and I need to essentially rename a request header. A proxy closer to the origin is stripping off the X-Forwarded-For header, but we need that data to persist, so I ...
0
votes
1answer
220 views

Set Apache response header for a specific response status code

When my PHP application returns a 301 status code, I would like to automatically add some headers to the response to prevent caching the redirect. Header set "Expires" "Tue, 03 Jul 2001 06:00:00 GMT" ...
0
votes
1answer
81 views

SaaS style CNAMEs with Apache2

So I have a Rails application behind Apache. It is running via Thin, but all of this really doesn't matter. I'm having trouble getting my SaaS style CNAMEs working. Currently I have two different ...
0
votes
3answers
244 views

What is best practice for updating an entire website?

I have a site that is a complete redo of an existing one that is ready to go live. I can't find enough information to make a successful transition to the new site. I have the new site accessible from ...
0
votes
2answers
292 views

mod_headers Server

I run a CentOS box with WHM/cPanel, and I rebuilt Apache to have mod_headers. mod_headers works fine when I am adding new headers, but for some reason I cannot change the "Server:" header to a ...
0
votes
2answers
781 views

mod_headers is simply not working

I have enabled mod_headers in my apache (2.2 on windows server 2008) config but it is not doing anything. I have moved the headers directive to all parts of the config and even to a .htaccess file in ...
0
votes
0answers
36 views

apache put input value on request header [duplicate]

What I need to do is put the groupID on to request header before forwarding the page to the http://otherServer/app which expects the groupID to be on the request header and userID to be on parameters. ...
0
votes
0answers
307 views

How to add a custom header despite a RewriteRule redirecting to 304?

I have an apache2 server set up to return 304 responses when appropriate. I implemented it with a rewrite rule, like so: <VirtualHost *:9290> (...) Header set Last-Modified "Tue, 01 Jan ...
0
votes
0answers
13 views

Cgi 2.4 does not display headers

With Cgi 2.4, I am facing a problem of displaying headers which does not respect the standart norme. If I put a header with this format: X-xxxx is accepeted but X_xxx does not. any solution? thanks
0
votes
0answers
42 views

Clone/duplicate cookie with different path

I would like using mod_headers module in Apache to clone/duplicate cookie with name 'lang' with different path. More precisely I've got cookie "lang" assigned to "/man/" and I would like to clone ...
0
votes
1answer
139 views

apache mod_headers custom header

Folks, Trying to add a custom header with mod_headers. Need to set the 'Date' Header for AWS S3 via mod_headers. I am trying to do the following in the apache config: RequestHeader add ...
0
votes
1answer
504 views

Combining URL mapping and Access-Control-Allow-Origin: *

I am in the progress of migrating an old banner system to a new one and in doing so I want to rewrite the old banner system's URL's to the new one. I load my banners via an AJAX request, and therefore ...
0
votes
0answers
138 views

mod_header copy

I wanted to see if anyone can help me in using mod_headers module in apache2 My problem is that I have a header with the name MY_HEADER = MY_VALUE which I need to add rename and add as a new ...
0
votes
0answers
204 views

Force download not working on particular file server

I have a few servers for storing files and I have this in my .htaccess to force download of mp3 files (instead of the browser streaming it). However, on one file server this does not work. Mod_headers ...