[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-users
Subject:    Re: [users@httpd] Problem with Content-Type recognition
From:       Michael Felt <mamfelt () gmail ! com>
Date:       2014-06-30 21:27:49
Message-ID: CAN9c_NTQNN9Cn0Of4JLEVG6W6MQ9CqvjZ+fJxprBn7YE38pvBw () mail ! gmail ! com
[Download RAW message or body]

I did not figure out how to get extra info from the "maintainer" and
"debug" enabled version, and it was not as stable (may need to also rebuild
the php module against the "debug" version. I hoped syslog and .debug level
would be very verbose.

So, call me "anything you like", but I am not coming up with the right
combination of directives to get httpd to ignore the .php in the filename
(e.g., removeEncoding had no effect).

What directive should I be using instead?

Many thanks for assistance!

Michael


On Mon, Jun 23, 2014 at 2:51 PM, Michael Felt <mamfelt@gmail.com> wrote:

> I have recompiled httpd-2.2.27 with --enable-maintainer-mode and
> --enable--debugger-mode, and set, to be sure, optimization to -O0
>
> Some help with what needs to be done to get more debug info into the logs
> is appreciated.
>
> (Note: going on a short vacation, so I might not respond again real soon).
>
>
> On Mon, Jun 23, 2014 at 10:48 AM, Michael Felt <mamfelt@gmail.com> wrote:
>
>> Good Idea, and I was hoping that using
>>
>>     RemoveEncoding .php
>>
>> was doing that.
>>
>> As this is a vhost, and other vhosts are using php I do not see removing
>> PHP from the server as a solution. So, RemoveEncoding may be the wrong
>> solution. (I was glad I even figured out that the embedded .php. in the
>> filename is what was triggering this?)
>>
>> Should I "change" the encoding - will that override the effect you
>> describe?
>>
>> I tried experimenting with this: still not getting the effect I am
>> looking for. I am assuming I am using the wrong directive. (I removed the
>> RemoveEncoding because I changed the Type - and it did not seem to be doing
>> anything anyway).
>>
>> <Directory "/aixtools/dl.aixtools">
>>     DefaultType application/octet-stream
>>     AddType application/octet-stream .php
>>
>>     <Files *.I>
>> #   RemoveEncoding .php
>>
>>     ForceType application/octet-stream
>>     </Files>
>>     Options Indexes FollowSymLinks
>>         IndexOptions FancyIndexing Namewidth=* FoldersFirst
>> SuppressDescription
>>         IndexOrderDefault Descending Date
>>     AllowOverride None
>>     Order allow,deny
>>     Allow from all
>> </Directory>
>>
>>
>>
>> On Sun, Jun 22, 2014 at 11:45 PM, Nick Kew <nick@webthing.com> wrote:
>>
>>> On Sat, 21 Jun 2014 16:45:10 +0200
>>> Michael Felt <mamfelt@gmail.com> wrote:
>>>
>>> > I have tried, in a vhost area, to set the DefaultType to
>>> > application/octet-stream, and I have tried to add a Type for .I
>>> (capital i)
>>> > endings. However, httpd-2.2.27 seems to be preferring the .php. in the
>>> > filename rather than the .I at the end of the file. When I link the
>>> file to
>>> > that it has the name *.php5.* then the ContentType: is as expected.
>>>
>>> If you have PHP handling .php requests, then PHP sets the Content-Type
>>> (and other) headers, overriding your config.
>>>
>>> Turn off PHP (in the scope of the URL in question) if you want
>>> to use Apache configuration to control content-type.
>>>
>>>
>>> --
>>> Nick Kew
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>
>

[Attachment #3 (text/html)]

<div dir="ltr"><div><div><div><div>I did not figure out how to get extra info from \
the &quot;maintainer&quot; and &quot;debug&quot; enabled version, and it was not as \
stable (may need to also rebuild the php module against the &quot;debug&quot; \
version. I hoped syslog and .debug level would be very verbose.<br> <br></div>So, \
call me &quot;anything you like&quot;, but I am not coming up with the right \
combination of directives to get httpd to ignore the .php in the filename (e.g., \
removeEncoding had no effect).<br><br></div>What directive should I be using \
instead?<br> <br></div>Many thanks for assistance!<br><br></div>Michael<br></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 23, 2014 at 2:51 PM, \
Michael Felt <span dir="ltr">&lt;<a href="mailto:mamfelt@gmail.com" \
target="_blank">mamfelt@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div>I have recompiled httpd-2.2.27 with \
--enable-maintainer-mode and --enable--debugger-mode, and set, to be sure, \
optimization to -O0<br> <br></div>Some help with what needs to be done to get more \
debug info into the logs is appreciated.<br> <br></div>(Note: going on a short \
vacation, so I might not respond again real soon).<br></div><div class="HOEnZb"><div \
class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 23, \
2014 at 10:48 AM, Michael Felt <span dir="ltr">&lt;<a href="mailto:mamfelt@gmail.com" \
target="_blank">mamfelt@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Good Idea, and I was hoping that using<br><br> \
RemoveEncoding .php<br><br>was doing that.<br><br>As this is a vhost, and other \
vhosts are using php I do not see removing PHP from the server as a solution. So, \
RemoveEncoding may be the wrong solution. (I was glad I even figured out that the \
embedded .php. in the filename is what was triggering this?)<br>


<br>Should I &quot;change&quot; the encoding - will that override the effect you \
describe?<br><br>I tried experimenting with this: still not getting the effect I am \
looking for. I am assuming I am using the wrong directive. (I removed the \
RemoveEncoding because I changed the Type - and it did not seem to be doing anything \
anyway).<br>


<br><span style="font-family:courier new,monospace">&lt;Directory \
&quot;/aixtools/dl.aixtools&quot;&gt;<br>       DefaultType \
application/octet-stream<br>       AddType application/octet-stream .php<br><br>      \
&lt;Files *.I&gt;<br>


#     RemoveEncoding .php<div><br>       ForceType application/octet-stream<br>       \
&lt;/Files&gt;<br>       Options Indexes FollowSymLinks<br>               \
IndexOptions FancyIndexing Namewidth=* FoldersFirst SuppressDescription<br> \
</div><div>               IndexOrderDefault Descending Date<br>  AllowOverride \
None<br>       Order allow,deny<br>       Allow from \
all<br>&lt;/Directory&gt;</div></span><br></div><div><div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 22, 2014 at 11:45 \
PM, Nick Kew <span dir="ltr">&lt;<a href="mailto:nick@webthing.com" \
target="_blank">nick@webthing.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div>On Sat, 21 Jun 2014 16:45:10 +0200<br> Michael Felt \
&lt;<a href="mailto:mamfelt@gmail.com" target="_blank">mamfelt@gmail.com</a>&gt; \
wrote:<br> <br>
&gt; I have tried, in a vhost area, to set the DefaultType to<br>
&gt; application/octet-stream, and I have tried to add a Type for .I (capital i)<br>
&gt; endings. However, httpd-2.2.27 seems to be preferring the .php. in the<br>
&gt; filename rather than the .I at the end of the file. When I link the file to<br>
&gt; that it has the name *.php5.* then the ContentType: is as expected.<br>
<br>
</div>If you have PHP handling .php requests, then PHP sets the Content-Type<br>
(and other) headers, overriding your config.<br>
<br>
Turn off PHP (in the scope of the URL in question) if you want<br>
to use Apache configuration to control content-type.<br>
<span><font color="#888888"><br>
<br>
--<br>
Nick Kew<br>
</font></span><div><div><br>
---------------------------------------------------------------------<br>
To unsubscribe, e-mail: <a href="mailto:users-unsubscribe@httpd.apache.org" \
target="_blank">users-unsubscribe@httpd.apache.org</a><br> For additional commands, \
e-mail: <a href="mailto:users-help@httpd.apache.org" \
target="_blank">users-help@httpd.apache.org</a><br> <br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic