[us...@httpd] Add HTTP header charset from HTML meta tag?

2010-12-12 Thread David Lane
Hello,

I'm looking for a way to handle a body of existing HTML which is encoded
inconsistently.  On the basis that the meta tag is likely to be correct, I'd
like to use that to set the HTTP content-type header's charset.  I have
Googled for solutions, and checked the module documents, and I don't see a
way to do what I have in mind.  I found a number of ways to set the header,
which seem to be more correct and would be fine in a better situation
(.htaccess files, changing file suffixes, etc.), but the tangle of existing
content, CMS, users and maintenance makes me lean toward a server-based
solution.  Did I miss something obvious?

David.


Re: [us...@httpd] Add HTTP header charset from HTML meta tag?

2010-12-12 Thread Nick Kew

On 12 Dec 2010, at 18:57, David Lane wrote:

 Hello,
 
 I'm looking for a way to handle a body of existing HTML which is encoded 
 inconsistently.  On the basis that the meta tag is likely to be correct, I'd 
 like to use that to set the HTTP content-type header's charset.  I have 
 Googled for solutions, and checked the module documents, and I don't see a 
 way to do what I have in mind.  I found a number of ways to set the header, 
 which seem to be more correct and would be fine in a better situation 
 (.htaccess files, changing file suffixes, etc.), but the tangle of existing 
 content, CMS, users and maintenance makes me lean toward a server-based 
 solution.  Did I miss something obvious?

If it's too inconsistent to automate, there's no really good solution.

mod_xml2enc nearly does what you want: it'll sniff the encoding from the meta
if the server doesn't set charset.  If you just chop out the libxml2 detection
(xmlParseCharEncoding) it'll do exactly what you need.  Alternatively you can
use it together with a libxml2-consumer module like mod_proxy_html, which
both deals with the charset issue and offers explicit meta http-equiv support.

-- 
Nick Kew
-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Alias-ed directory appears on multiple virtual hosts

2010-12-12 Thread Matus UHLAR - fantomas
On 08.12.10 12:45, Tom Evans wrote:
 The best way to avoid this problem is not dummy vhosts, it is to not
 serve multiple websites from the same IP if you intend on handling SSL
 for any one of those websites and not the others. SSL sites that share
 a certificate (eg, if you have a wildcard certificate) are fine to
 share an IP.

but when anyone points any hostname to the same address, he can ONLY process
it as 
- the main and only host on the adress
- throw and error host not configured.
for the latter, he must configure one more virtual host on the same IP/port
pair because apache does NOT know the host not configured error so we must
create it.

-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
The early bird may get the worm, but the second mouse gets the cheese. 

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Alias-ed directory appears on multiple virtual hosts

2010-12-12 Thread Matus UHLAR - fantomas
 On 08.12.2010 12:48, Tom Evans wrote:
 ... and serve data from the www.hosta.com vhost.

On 08.12.10 13:21, b...@kanka.de wrote:
 .. but at this point apache knows that there is something wrong with the  
 request or the configuration, and should throw an error instead of 
 serving the wrong data.

I am also sorry but apache does not support any host not configured error,
it just uses default (first configured) vhost in such case.

I'd love if apache supported the host not configured error.
-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I drive way too fast to worry about cholesterol. 

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Module specific logging not working

2010-12-12 Thread Rainer Jung

On 10.12.2010 19:25, Dustin Chesterman wrote:

On 10.12.2010 01:18, Dustin Chesterman wrote:

Hello all -
I am having trouble getting logging to work for some modules,
specifically mod_rewrite and mod_jk.  Here is a portion of my
httpd.conf.  I get mod_jk logging for the startup process in my
mod_jk.log but not the request level logging.  But the forwarding is
working.  The rewrite.log has nothing in it ever.  I thought it could
be a problem with how i set up the modules butsince it's happening to
two I thought I must have something wrong globally.  Any suggestions
on why this might be happening.  My access.log is populating as
expected.



Concerning mod_jk: since you hav JkLogLevel debug, you should see *lots*
of log lines for each request and also during startup of the web server.
Do you see those types of messages? Is it only the additional one line
per request JkRequestLogFormat you are missing?

If so I would expect that you actually are handling the requests by some
other VHost which does not include the JkRequestLogFormat item. Try
setting it into the global server. It should get inherited by each VHost.



After looking more into the mod_jk logging issue, the logging
is being written but not until I stop the server.  It must be buffered
and would maybe come through eventually if I made enough requests??


Ah, sometimes on Windows the file time stamp in file explorer are not 
updated and you will only notice the new contents when actually opening 
the file.


There is no additional buffering by mod_jk.

Regards,

Rainer

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] SetEnv HTTPS on... not working.

2010-12-12 Thread Mxrgus Pxrt

Hey!

I did not mean that I want HTTP to HTTPS transparency (although, I can't 
see how do they differ to end application - communication from client to 
server is over SSL with HTTPS + few additional environmental values - 
should not affect end app).


I'll try to explain, what I ment with an example:

Components:
- client
- SSL offloader (Apache)
- Backend server (Apache)


Now client makes query to https://example.com. Backend server requeries 
that HTTPS on or redirect to there is done. Code example below:


RewriteCond %{HTTPS} !=on
RewriteRule (.*)  https://example.com/$1 [L,R=301]


(But this does not work, as query comes to port 80 over HTTP from SSL 
offloader and infinite loop is created.)



I know, I could write headers from SSL offloader and check in backend 
server (or even do this in SSL offloader):


RewriteCond %{HTTP:HTTPS} !=on
RewriteRule (.*)  https://example.com/$1 [L,R=301]


But I am stubborn and want to know, how to overwrite this value (or 
answer, that it's not possible because of ...).



Br,
Margus




On 12/11/2010 04:46 PM, Jeroen Geilman wrote:

On 12/10/10 12:55 PM, Mxrgus Pxrt wrote:
I have SSL offloader, what checks wheather user came using HTTP or 
HTTPS (sends accordingly header.)


As I want it to be transparent to application and available to 
.htaccess, I use apaches values. I want to overwrite them.


Switching from HTTP to HTTPS cannot be transparent. ever.




-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org