The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
99 views

Apache HSTS exception for some virtual hosts

In the global config section for Apache 2.2.15, I have the following (per recommendation) <IfModule mod_headers.c> Header add Strict-Transport-Security "max-age=15768000;includeSubDomains" ...
1
vote
1answer
61 views

apache expires not working for pyramid server

I have a pyramid server running on EC2 via apache with following configuration - <Directory path_to_virtual_env> WSGIProcessGroup pyramid Require all granted Order allow,deny ...
0
votes
0answers
45 views

Mod_Headers SetEnvIf Directive

I am trying to capture the specific RequestHeader but couldn't get hold of it. In my case SiteMinder is used for authentication and I am able to log the SM_USER value by providing the following entry ...
-1
votes
2answers
120 views

Apache - force set 304 status for all images

Is it possible to force set HTTP 304 status for all images? I wrote code below in my vhost, but now instead 404/304 status I get 500 <filesMatch "\.(ico|gif|jpg|png|jpeg)$"> Header set 304 ...
0
votes
1answer
277 views

Set header directive globally for all virtual hosts in Apache HTTP

The header directive says it can be set for the server config context but setting it outside any virtual hosts has no effect. I would like to globally unset a header across all virtual hosts. I have ...
1
vote
0answers
83 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
2answers
108 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> ...
0
votes
1answer
80 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
69 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 ...
4
votes
3answers
712 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 ...
1
vote
1answer
198 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
118 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 ...
0
votes
1answer
482 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
242 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 ...
1
vote
1answer
420 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
275 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
2answers
634 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 ...
2
votes
1answer
518 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: ...
-1
votes
1answer
93 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 ...
2
votes
1answer
1k 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 ...
0
votes
1answer
607 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
3answers
294 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 ...
1
vote
1answer
256 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 ...
0
votes
2answers
368 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 ...
1
vote
1answer
4k 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 ...
2
votes
0answers
303 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 ...
2
votes
2answers
880 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 ...
1
vote
3answers
528 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 ...
0
votes
2answers
311 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 ...
1
vote
2answers
1k 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 ...
1
vote
1answer
440 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 ...
1
vote
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 ...