Re: [users@httpd] RewriteCond and negative matching

2025-04-14 Thread Dave Wreski
If the "home page" is an index file in the documentroot, a simple FallbackResource will suffice, and you don't need to use mod_rewrite at all. I believe that only works for physical files, like /images/myimage.gif, and not for virtual paths set up by Joomla, like /news/

Re: [users@httpd] RewriteCond and negative matching

2025-04-14 Thread Dave Wreski
Hi, We're getting a ton of 404s for URLs for paths that don't exist, like /apps and other nonsense off the root that never existed that I'd like to redirect to the homepage. ... If the "home page" is an index file in the documentroot, a simple FallbackResource will suffice, and y

[users@httpd] RewriteCond and negative matching

2025-04-13 Thread Dave Wreski
Hi, We're getting a ton of 404s for URLs for paths that don't exist, like /apps and other nonsense off the root that never existed that I'd like to redirect to the homepage. Here's what I'm working with so far, but it redirects everything to the homepage, including valid articles. For exampl

[users@httpd] Simplyfing rewrite rules

2025-02-12 Thread Dave Wreski
Hi, Can someone help me to consolidate these rules into something more efficient? RewriteCond %{REQUEST_URI} !^/images/gen RewriteRule ^images/(.*)-esm-w([0-1]{1}[0-9]{2}|200)\.webp$ /images/gen/$1-esm-w200.webp [R=301,L] RewriteCond %{REQUEST_URI} !^/images/gen RewriteRule ^images/(.*)-esm-

[users@httpd] Rewrite without redirect?

2025-02-07 Thread Dave Wreski
Hi, I'd like to figure out how best to strip random query strings applied by external sites to our links like this: https://linuxsecurity.com/features/top-6-vulnerability-scanning-tools?ZhdOK=VBKCrHPPeszbcJQ The problem is that Google considers them unique URLs, which creates a duplicate con

Re: [users@httpd] Using THE_REQUEST with rewrites

2025-01-11 Thread Dave Wreski
Hi, On 1/11/25 3:36 PM, Eric Covener wrote: 68.195.111.42 - - [11/Jan/2025:15:10:39 -0500] "GET /http:/example.com/123/ HTTP/1.1" 404 196 r:"-" "Mozilla" Where did the other slash go after the http:/? MergeSlashes defaults to "on". I've added the following to my vhost config: MergeSlashes

[users@httpd] Using THE_REQUEST with rewrites

2025-01-11 Thread Dave Wreski
Hi, We need to construct a rewriterule that fixes problems like: https://linuxsecurity.com/https://example.com/123/ I'd like to just redirect it to https://example.com/123 except the log entry looks like this: 68.195.111.42 - - [11/Jan/2025:15:10:39 -0500] "GET /http:/example.com/123/ HTTP/1

Re: [users@httpd] Header set Link?

2024-11-17 Thread Dave Wreski
On 11/16/24 1:52 PM, Dave Wreski wrote: Header add Link "<https://%{HTTP_HOST}e%{REDIRECT_PDF_CANONICAL_URL}e>; rel=\"canonical\"" env=REDIRECT_PDF_CANONICAL_URL However, the %{HTTP_HOST} variable doesn't seem to be set. I don't think you can expect tha

Re: [users@httpd] Header set Link?

2024-11-16 Thread Dave Wreski
Header add Link "; rel=\"canonical\"" env=REDIRECT_PDF_CANONICAL_URL However, the %{HTTP_HOST} variable doesn't seem to be set. I don't think you can expect that environment variable to be defined. Maybe you want to switch the value argument t

[users@httpd] Header set Link?

2024-11-15 Thread Dave Wreski
Hi, I'm using httpd-2.4.62 on fedora40 and I would like to dynamically add a Canonical Tag to the HTTP Header. I set this in my .htaccess in the document root. SetEnvIf Request_URI "(.+)\.pdf$" PDF_CANONICAL_URL=$1\.pdf Header add Link ";

Re: [users@httpd] AH00051: child pid 3886730 exit signal Segmentation fault (11), possible coredump in /etc/httpd

2024-09-28 Thread Dave Wreski
://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&Bugzilla_remember=on&Bugzilla_restrictlogin=on&GoAheadAndLogIn=Log%20in On Fri, Sep 27, 2024 at 8:31 PM Dave Wreski wrote: I'm using httpd-2.4.62 on fedora40 and noticed periodic errors related to core dumps. Is this a potential

Re: [users@httpd] AH00051: child pid 3886730 exit signal Segmentation fault (11), possible coredump in /etc/httpd

2024-09-27 Thread Dave Wreski
I'm using httpd-2.4.62 on fedora40 and noticed periodic errors related to core dumps. Is this a potential bug? I see there are several similar bug reports with previous versions but never a resolution. The crash symptom by iteslf doesn't mean very much without specific backtraceshttps://httpd.a

Re: [users@httpd] AH00051: child pid 3886730 exit signal Segmentation fault (11), possible coredump in /etc/httpd

2024-09-27 Thread Dave Wreski
Hi, I'm using httpd-2.4.62 on fedora40 and noticed periodic errors related to core dumps. Is this a potential bug? I see there are several similar bug reports with previous versions but never a resolution. [Wed Sep 25 11:07:16.786647 2024] [core:notice] [pid 1616:tid 161

[users@httpd] AH00051: child pid 3886730 exit signal Segmentation fault (11), possible coredump in /etc/httpd

2024-09-26 Thread Dave Wreski
Hi, I'm using httpd-2.4.62 on fedora40 and noticed periodic errors related to core dumps. Is this a potential bug? I see there are several similar bug reports with previous versions but never a resolution. [Wed Sep 25 11:07:16.786647 2024] [core:notice] [pid 1616:tid 1616] AH00051: child pid

Re: [users@httpd] Brotli compression

2024-09-05 Thread Dave Wreski
ge Cache-Control "no-transform" This header was preventing cloudflare from compressing content, by design. dave On 9/4/24 3:55 PM, Dave Wreski wrote: Hi, I'm having difficulty setting brotli compression for one of our sites. I'm using the same config for all sites, but it&#

[users@httpd] AH00656 can't open DBM RewriteMap

2024-08-15 Thread Dave Wreski
Hi, I've just upgraded fedora38 to fedora40 with apache-2.4.62 and now my my rewritemap doesn't work: [Thu Aug 15 21:31:49.488178 2024] [rewrite:error] [pid 518406:tid 518478] (13)Permission denied: [client 68.195.111.42:0] AH00656: mod_rewrite: can't open DBM RewriteMap /etc/httpd/conf.d/my

Re: [users@httpd] RewriteRule and redirect loop with htaccess

2024-08-04 Thread Dave Wreski
Hi, Replace the following: RewriteCond %{REQUEST_URI} !^/index\.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L] With: FallbackResource /index.php Thanks so much, as usual. That's very helpful. After like ten hours of debugging, I als

Re: [users@httpd] RewriteRule and redirect loop with htaccess

2024-08-04 Thread Dave Wreski
Hi, I have a rewrite that's creating a loop because the origin is contained in the final destination. I know it then is processed again by the .htaccess in the document root, but I don't understand why or how to stop it. What's the solution here? RewriteR

Re: [users@httpd] RewriteRule and redirect loop with htaccess

2024-08-02 Thread Dave Wreski
Hi, I have a rewrite that's creating a loop because the origin is contained in the final destination. I know it then is processed again by the .htaccess in the document root, but I don't understand why or how to stop it. What's the solution here? RewriteRule ^/features/l

[users@httpd] RewriteRule and redirect loop with htaccess

2024-08-02 Thread Dave Wreski
Hi, I have a rewrite that's creating a loop because the origin is contained in the final destination. I know it then is processed again by the .htaccess in the document root, but I don't understand why or how to stop it. What's the solution here? RewriteRule ^/features/linux-malware-the-tru

Re: [users@httpd] Simulating rewrite rules?

2024-07-15 Thread Dave Wreski
Hi, On 7/11/24 9:46 AM, Frank Gingras wrote: On Thu, Jul 11, 2024 at 4:49 AM Marc wrote: > > RewriteCond %{HTTP_USER_AGENT} ^$ > [OR] > RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* > [NC,OR] > RewriteCond %{HTTP_USER_AGENT} > ^.*(HTTrack|cls

[users@httpd] RewriteMap and combining RewriteRules

2024-07-14 Thread Dave Wreski
Hi, I'm still working on improving our redirects. I'm looking for a more efficient way for apache to process rewrites other than using a text file with many RewriteRules in them. I'm using RewriteMap in another capacity (involving the use of a script for the default action if there is no mat

Re: [users@httpd] Simulating rewrite rules?

2024-07-10 Thread Dave Wreski
Hi, Hi, I have the following rewrite rule in place on one of our staging sites to redirect bots and malicious scripts to our corporate page:   RewriteCond %{HTTP_USER_AGENT} ^$ [OR]   RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]   Rewri

[users@httpd] Simulating rewrite rules?

2024-07-09 Thread Dave Wreski
Hi, I have the following rewrite rule in place on one of our staging sites to redirect bots and malicious scripts to our corporate page:   RewriteCond %{HTTP_USER_AGENT} ^$ [OR]   RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]   RewriteCond %{HTTP_USER_AGENT} ^.*(H

Re: [users@httpd] Removing single question mark?

2024-06-20 Thread Dave Wreski
Hi, I should add that I wrote the following to remove an errant question mark from the end of another URL, but it doesn't appear to work for the homepage. RewriteCond %{THE_REQUEST} /features\? [NC] RewriteRule ^ %{REQUEST_URI} [L,R=302,NE,QSD] Thanks, Dave On 6/20/24 7:01 PM, Dave W

[users@httpd] Removing single question mark?

2024-06-20 Thread Dave Wreski
Hi, I have another challenging rewrite rule request, please. I'm trying to remove a single question mark from a URL: https://example.com/? I've tried the following: RewriteRule ^/\?$ / [L,R=301,QSD] RewriteRule ^/\? /? [L,R=301] RewriteCond %{REQUEST_URI} ^$ RewriteRule ^ /? [L,R=301,QSD]

Re: [users@httpd] Stripping trailing slashes (again)

2024-06-13 Thread Dave Wreski
Some time ago I requested help with a rewrite rule to strip trailing slash(es) from all URLs in our joomla website, but I'm still having problems. This is the rule I am currently working with: RewriteRule ^(.*)/+$ https://linuxsecurity.com$1 [R=301,L] It works fine for any

[users@httpd] Stripping trailing slashes (again)

2024-06-13 Thread Dave Wreski
Hi, Some time ago I requested help with a rewrite rule to strip trailing slash(es) from all URLs in our joomla website, but I'm still having problems. This is the rule I am currently working with: RewriteRule ^(.*)/+$ https://linuxsecurity.com$1 [R=301,L] It works fine for any URL other than

Re: [users@httpd] Redirecting based on IP

2024-06-06 Thread Dave Wreski
Hi, The next steps I'd like to do is to redirect anyone not in that RequireAll statement to be redirected to the production site. Is this possible? Perhaps a RewriteCond that depends upon certain IPs, then otherwise redirects to the production site? I don't think relying on the IPs is a good

Re: [users@httpd] Redirecting based on IP

2024-05-17 Thread Dave Wreski
Hi, The staging site is even protected with a RequireAll statement for the DocumentRoot based on the IP, which then results in a 404 and other errors in GSC. That sound wrong. If your RequireAll was working as advertised, should it not return a 403? Yes, it does - my mistake. The next ste

[users@httpd] Redirecting based on IP

2024-05-15 Thread Dave Wreski
Hi, Google insists that one of our staging sites needs to be indexed despite "disallow" in robots.txt and a half-dozen other methods for preventing Google from indexing it (including submitting it for removal from their index). The staging site is even protected with a RequireAll statement fo

Re: [users@httpd] Stripping query string except from specific URL

2024-04-28 Thread Dave Wreski
RewriteCond %{REQUEST_URI} !/resources/blog RewriteCond %{QUERY_STRING} ^start=\d+$ RewriteRule (.*)   /$1?    [L,R=301,QSD] [Sun Apr 28 15:40:02.614893 2024] ... rewrite 'resources/blog' -> 'index.php' [Sun Apr 28 15:40:02.614921 2024] ... internal redirect with

Re: [users@httpd] Stripping query string except from specific URL

2024-04-28 Thread Dave Wreski
Hi, I'm really quite stuck and hoped you could help. My apologies - the output was from wget, as that's what I typically use. $ curl 'https://guardiandigital.com/resources/blog?start=48' 301 Moved Permanently Moved Permanently The document has moved https

Re: [users@httpd] Stripping query string except from specific URL

2024-04-24 Thread Dave Wreski
13 62.111.193.42 - - [24/Apr/2024:15:19:36 -0400] "GET /index.php HTTP/1.1" 200 33921 r:"-" "Wget/1.21.4" X:"SAMEORIGIN" 0/129431 573/35481/33921 H:HTTP/1.1 U:/index.php gd443 s:200 It did exactly what you asked, yes. Further, I asked you to use curl to see if you get redirected f

Re: [users@httpd] Stripping query string except from specific URL

2024-04-24 Thread Dave Wreski
Hi, We have a situation where we need to strip a query string from all URLs except ones matching a particular pattern. However, when I try the rules below, it redirects to the homepage for some reason. In this example, I'd like to strip off the query stri

Re: [users@httpd] Stripping query string except from specific URL

2024-04-24 Thread Dave Wreski
Hi, We have a situation where we need to strip a query string from all URLs except ones matching a particular pattern. However, when I try the rules below, it redirects to the homepage for some reason. In this example, I'd like to strip off the query string from all URLs exc

[users@httpd] Stripping query string except from specific URL

2024-04-19 Thread Dave Wreski
Hi, We have a situation where we need to strip a query string from all URLs except ones matching a particular pattern. However, when I try the rules below, it redirects to the homepage for some reason. In this example, I'd like to strip off the query string from all URLs except those involvi

Re: [users@httpd] RewriteMap and patterns

2024-03-28 Thread Dave Wreski
of putting the top 5000 key/value in the map to be really quick, then let the redirection.php script process the remaining legacy 70,000 or so... -- Profile Photo Dave Wreski Chief Executive Officer Guardian Digital Logo <https://www.guardiandigital.co

Re: [users@httpd] RewriteMap and patterns

2024-03-28 Thread Dave Wreski
Hi, First make the proper redirections:   RewriteEngine on   RewriteMap lsv2ids "txt:/etc/httpd/conf.d/linuxsecurity-lsv2ids.map"   RewriteRule "/content/view/(.*)" "${lsv2ids:$1}" [R,L] Define the fallback for requests not ending in PHP but for which I hand the php handler to deal them.   F

Re: [users@httpd] RewriteMap and patterns

2024-03-23 Thread Dave Wreski
Hi, What I would do is RewriteRule with just [L] tag for internal redirection or [R,L] if you don't mind the redirection to be external. Since I haven't seen the whole configuration my guess is you don't have the proper handler defined for the resulting url and that's why you get a 404, and

Re: [users@httpd] RewriteMap and patterns

2024-03-12 Thread Dave Wreski
On 3/11/24 4:42 PM, apmail-dferra...@apache.org wrote: On 09/03/2024 22:59, Dave Wreski wrote: Hi Eric, Might have to prefix with %{DOCUMENT_ROOT} I've tried variations of that, including the following, but no luck. They all fail with 400 or "invalid request" RewriteRule

Re: [users@httpd] RewriteMap and patterns

2024-03-09 Thread Dave Wreski
Hi Eric, Might have to prefix with %{DOCUMENT_ROOT} I've tried variations of that, including the following, but no luck. They all fail with 400 or "invalid request" RewriteRule "/content/view/(.*)" "${lsv2ids:$1}" RewriteRule "/content/view/(.*)" "%{DOCUMENT_ROOT}${lsv2ids:$1}" [PT] Rewrite

Re: [users@httpd] RewriteMap and patterns

2024-03-09 Thread Dave Wreski
Hi, I think the issue is that mod_proxy uses r->filename (i.e. what non-PT rewrites put the substitution) to setup the proxy sub-modules when using SetHandler to configure proxying. I'm not sure I understand what that means - do you have a recommendation for how I should configure this instea

Re: [users@httpd] RewriteMap and patterns

2024-03-08 Thread Dave Wreski
Hi, What you have looks reasonable, PT should be URL-to-URL. You might try logging %f in your logformat. I've added %f and it just shows some of what looks like components from the 404 page, not the redirected page. What kind of handler is meant to handle these requests and how is it confi

[users@httpd] RewriteMap and patterns

2024-03-07 Thread Dave Wreski
Hi, I'm trying to use RewriteMap on a few thousand older articles to map them to their modern equivalent. The pattern matches, but then the redirect doesn't occur. The examples and apache docs say I should be using [PT] to pass-through, but it results in a 404: [Thu Mar 07 09:56:47.696040 20

Re: [users@httpd] Limiting redirects with rewriterule/rewritecond

2024-02-29 Thread Dave Wreski
In my ongoing effort to reduce the number of redirects for linuxsecurity.com , I could use a bit more help. Currently we have one redirect to strip off any potential trailing slash as well as another that strips out any preceding 'www'. RewriteC

[users@httpd] Limiting redirects with rewriterule/rewritecond

2024-02-25 Thread Dave Wreski
Hi, In my ongoing effort to reduce the number of redirects for linuxsecurity.com, I could use a bit more help. Currently we have one redirect to strip off any potential trailing slash as well as another that strips out any preceding 'www'. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRul

[users@httpd] Reducing redirects

2024-01-25 Thread Dave Wreski
Hi, I think I have what is a pretty involved request for assistance. We have a website with content that is decades old and has tens of thousands of pages of content of the form /content/view/1234, where 1234 is the Joomla article ID. Joomla has since started using search-engine friendly URL

Re: [users@httpd] Removing trailing slashes with query strings

2024-01-18 Thread Dave Wreski
Hi, [Tue Jan 16 08:55:13.289205 2024] [rewrite:trace1] [pid 904886:tid 904938] mod_rewrite.c(493): [client 68.111.193.42:0 ] 68.195.193.42 - - [webstage.example.com/sid#560ba7f01a68][rid#7f2b1c0bc210/initial

Re: [users@httpd] Removing trailing slashes with query strings

2024-01-17 Thread Dave Wreski
Hi, [Tue Jan 16 08:55:13.289205 2024] [rewrite:trace1] [pid 904886:tid 904938] mod_rewrite.c(493): [client 68.111.193.42:0 ] 68.195.193.42 - - [webstage.example.com/sid#560ba7f01a68][rid#7f2b1c0bc210/initial

Re: [users@httpd] Removing trailing slashes with query strings

2024-01-16 Thread Dave Wreski
Hi, On 1/16/24 3:03 PM, Dave Wreski wrote: [Tue Jan 16 08:55:13.289205 2024] [rewrite:trace1] [pid 904886:tid 904938] mod_rewrite.c(493): [client 68.111.193.42:0 <http://68.111.193.42:0>] 68.195.193.42 - - [webstage.example.com/sid#560ba7f01a68][rid#7f2b1c0bc210/i

Re: [users@httpd] Removing trailing slashes with query strings

2024-01-16 Thread Dave Wreski
[Tue Jan 16 08:55:13.289205 2024] [rewrite:trace1] [pid 904886:tid 904938] mod_rewrite.c(493): [client 68.111.193.42:0 ] 68.195.193.42 - - [webstage.example.com/sid#560ba7f01a68][rid#7f2b1c0bc210/initial

Re: [users@httpd] Removing trailing slashes with query strings

2024-01-16 Thread Dave Wreski
Hi, I have the following rule that works well to remove trailing slashes from URLs: RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ $1 [R=301,L] This is done to prevent the non-slash URL from being treated as duplicate content with the URL with a slash. The

[users@httpd] Removing trailing slashes with query strings

2024-01-15 Thread Dave Wreski
Hi, I have the following rule that works well to remove trailing slashes from URLs: RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ $1 [R=301,L] This is done to prevent the non-slash URL from being treated as duplicate content with the URL with a slash. The problem is that there ar

Re: [users@httpd] Rewrite query string?

2024-01-04 Thread Dave Wreski
https://example.com/search?searchword=CVE-2021-4014&Search= I've tried the following RewriteCond/RewriteRule in various forms, but not sure what I'm doing wrong. RewriteCond %{QUERY_STRING} ^searchword=(.*) RewriteRule ^ q=$1 [NC,L] Ideas for what I'm doing wrong would be greatly appreciated

[users@httpd] Rewrite query string?

2024-01-04 Thread Dave Wreski
Hi, I'm trying to replace "searchword" with just "search" in the following URL: https://example.com/search?searchword=CVE-2021-4014&Search= I've tried the following RewriteCond/RewriteRule in various forms, but not sure what I'm doing wrong. RewriteCond %{QUERY_STRING} ^searchword=(.*) Rewri

Re: [users@httpd] Removing trailing slashes?

2023-12-14 Thread Dave Wreski
Hi, I would stop using .htaccess files, first, and merge all rewrite rules in the relevant vhost / Directory block. Then, I would use the rewrite log to see what is really happening. Using multiple .htaccess files is a recipe to lose all your hair. These are Included in the directory block.

Re: [users@httpd] Removing trailing slashes?

2023-12-14 Thread Dave Wreski
Hi, I have a FAQ, but need some additional info I haven't been able to find. I'm trying to process links Google has indicated are 404s that never really ever existed on our site. I have an htaccess file I'm Including with my main apache config that only contains RewriteConds

[users@httpd] Removing trailing slashes?

2023-12-13 Thread Dave Wreski
Hi, I have a FAQ, but need some additional info I haven't been able to find. I'm trying to process links Google has indicated are 404s that never really ever existed on our site. I have an htaccess file I'm Including with my main apache config that only contains RewriteConds. This file is pr

[users@httpd] Tracing redirects

2023-11-24 Thread Dave Wreski
Hi, I have a link on our site that is caught in a redirect loop that I can't figure out. We have a few thousand redirects, making it very difficult to track down. I've tried enabling logging: LogLevel info rewrite:trace2 but even with just trace2, there are thousands of log lines associated

[users@httpd] RewriteRule and priorities

2023-07-16 Thread Dave Wreski
Hi, I have a rewriterule like: RewriteRule ^/blog/(.*) /resources/blog/$1 [L,R=301] but I also have several instances where there are exceptions. In other words, I have an article at /blog/ that I want to be redirected to some place other than /resources/blog. How can I do this? Order of pr

Re: [users@httpd] SetEnvIf and exceptions

2023-04-12 Thread Dave Wreski
Hi, On 4/11/23 8:59 PM, Tatsuki Makino wrote: Dave Wreski wrote on 2023/04/12 01:39: In case I wasn't clear, simply removing the caret was not enough to make this work. The "Require env SOMENAME2" was enough to begin blocking every page on the site with a 403, not just the R

Re: [users@httpd] SetEnvIf and exceptions

2023-04-11 Thread Dave Wreski
Hi, SetEnvIf user-agent "(?i:TurnitinBot)" SOMENAME1 SetEnvIf Request_URI "^linuxsecurity_features\.*$" SOMENAME2 And let it meet all the requirements. Require all granted Require not env SOMENAME1 Require env SOMENAME2 This had the effect of blo

Re: [users@httpd] SetEnvIf and exceptions

2023-04-11 Thread Dave Wreski
Hi, SetEnvIf user-agent "(?i:TurnitinBot)" SOMENAME1 SetEnvIf Request_URI "^linuxsecurity_features\.*$" SOMENAME2 And let it meet all the requirements. Require all granted Require not env SOMENAME1 Require env SOMENAME2 This had the effect of blocking elements on every page (and t

Re: [users@httpd] SetEnvIf and exceptions

2023-04-11 Thread Dave Wreski
Hi, On 4/10/23 11:48 PM, Tatsuki Makino wrote: Dave Wreski wrote on 2023/04/11 10:54: SetEnvIf user-agent "(?i:TurnitinBot)" stayout=1 SetEnvIf Request_URI "^linuxsecurity_features\.*$" !stayout I have done it in the past, too. It was like allowing another level of condi

Re: [users@httpd] SetEnvIf and exceptions

2023-04-10 Thread Dave Wreski
Hi, I don't know what is troubling you... For now, don't use the combination of Order,Allow,Deny and Require* in configuration file that will be created in 202x. :) AllowDeny of ENV should be replaced by the following. Allow from env=X_FOOBAR -> Require env X_FOOBAR It can write more complex

Re: [users@httpd] SetEnvIf and exceptions

2023-04-10 Thread Dave Wreski
Hi, On 4/10/23 10:51 AM, Eric Covener wrote: .htaccess: negative Require directive has no effect in directive Ah, I guess you'll have to restore the RequireAll and its contents. Yes, I should have mentioned that I've already done that - without it, it was producing a 500 error for

Re: [users@httpd] SetEnvIf and exceptions

2023-04-10 Thread Dave Wreski
Hi, I have an apache-2.4.56 install on fedora37 and trying to block some bots from accessing the site, unless they're trying to access our RSS feeds. How can I do this? I'm blocking the bots with SetEnvIF lines in the .htacess file in the document root like:     SetEnvI

[users@httpd] SetEnvIf and exceptions

2023-04-08 Thread Dave Wreski
Hi, I have an apache-2.4.56 install on fedora37 and trying to block some bots from accessing the site, unless they're trying to access our RSS feeds. How can I do this? I'm blocking the bots with SetEnvIF lines in the .htacess file in the document root like:     SetEnvIf user-agent "(?i:li

[users@httpd] Cloudflare logging and remote IP

2023-01-27 Thread Dave Wreski
Hi, I'd like to be able to track the original IP making requests, not the cloudflare IP. How can I do that? It appears both mod_remoteip and mod_cloudflare are extremely old, and mod_cloudflare is apparently deprecated altogether. Does it require rebuilding apache with the mod_remoteip source,

[users@httpd] cache_disk:error and AH00717 errors

2022-11-28 Thread Dave Wreski
Hi, I have an apache-2.4.54 server on fedora37, and seeing errors related to cache_disk, although this problem has been happening through many previous versions as well. [Mon Nov 28 11:29:38.432076 2022] [cache_disk:error] [pid 65726:tid 65836] (2)No such file or directory: [client 141.101.7

[users@httpd] CSP Violation: "blocked-uri": "inline" despite having 'unsafe-inline'

2022-09-21 Thread Dave Wreski
Hi, I've just recently started working with the Content-Security-Policy header for my apache/joomla/fedora35 install on a pretty complex website and having some problems. Here is my current CSP header: "default-src 'self' 'unsafe-inline'; font-src 'self' fonts.googleapis.com fonts.gstati

[users@httpd] AH00717: Premature end of cache header

2021-09-20 Thread Dave Wreski
Hi, I'm seeing the following in the error_log with httpd-2.4.48-1.fc33.x86_64 [Mon Sep 20 16:03:43.127577 2021] [cache_disk:error] [pid 2940168:tid 2940247] (70014)End of file found: [client 141.101.76.246:16858] AH00717: Premature end of cache headers. Is this the same as this report create

[users@httpd] Redirects and rewrites and performance

2021-09-20 Thread Dave Wreski
Hi, At what point does it begin to affect performance with the number of redirects and rewrites being used on a website? Have there been any performance studies on this? We have a website (linuxsecurity.com) that's been around for decades, through many migrations, and have collected many (~1

Re: [users@httpd] X-Frame-Options and security

2021-09-10 Thread Dave Wreski
https://httpd.apache.org/docs/2.4/en/mod/mod_headers.html#header What headers are returned by error pages and by redirects (e.g. 302 redirect when requesting a directory without a trailing '/')? What headers are returned by dynamic responses (proxied or CGI), if you have any? It appears to mo

Re: [users@httpd] X-Frame-Options and security

2021-09-10 Thread Dave Wreski
https://httpd.apache.org/docs/2.4/en/mod/mod_headers.html#header What headers are returned by error pages and by redirects (e.g. 302 redirect when requesting a directory without a trailing '/')? What headers are returned by dynamic responses (proxied or CGI), if you have any? It appears to m

Re: [users@httpd] X-Frame-Options and security

2021-09-09 Thread Dave Wreski
reported that we were using both GOFORIT and SAMEORIGIN values. I used lynx to dump the headers and it only displays SAMEORIGIN, as it should. Where else can I look to see where this option is being set? Thanks, Dave On 9/1/21 7:43 PM, Eric Covener wrote: On Wed, Sep 1, 2021 at 7:30 PM Da

Re: [users@httpd] mod_status over SSL?

2021-09-07 Thread Dave Wreski
Hi, You have server-status defined within an 80/http virtual host and as such I expect it will only be available via port 80/http. You can define server-status more globally or within an https configuration depending on what you want to support. However, bottom line is server-status and server-

[users@httpd] mod_status over SSL?

2021-09-07 Thread Dave Wreski
Hi, I have an apache-2.4.48 server on fedora34 and would like to enable mod_status to be able to obtain server status information. However, the docs appear to say the only way to access it is over port 80, not SSL. Is that correct? Chrome is also expecting the site to be over SSL, of course.

Re: [users@httpd] X-Frame-Options and security

2021-09-02 Thread Dave Wreski
lways set Strict-Transport-Security "max-age=63072000; includeSubDomains" Header set Feature-Policy "geolocation 'self'; vibrate 'none'" Header set Content-Security-Policy "frame-ancestors 'self'" Thanks, Dave On 9/1/21 7

[users@httpd] X-Frame-Options and security

2021-09-01 Thread Dave Wreski
Hi, I ran a security scan for X-Frame-Options (https://gf.dev/x-frame-options-test) on our site (https://linuxsecurity.com), and it returned SAMEORIGIN, which is good, but it also returned GOFORIT. The only settings we have are the following:     Header set X-XSS-Protection "1; mode=bl

Re: [users@httpd] Random 500 errors

2021-04-20 Thread Dave Wreski
On 4/20/21 12:41 PM, Daniel Ferradal wrote: We can just speculate here to those questions. Rule of thumb if not showing in httpd error log, not httpd error. Thanks so much for your help. Would that include any RewriteRule entries? Of course just speculation, but that would lead me more towa

Re: [users@httpd] Random 500 errors

2021-04-20 Thread Dave Wreski
rhaps it's still being proxied, even though it's not being cached, and causing these errors? Would it explain why the same page doesn't always produce the error, or why not all pages produce a 500 error? Thanks, Dave El mar, 20 abr 2021 a las 14:49, Dave Wreski () escribió:

Re: [users@httpd] Random 500 errors

2021-04-20 Thread Dave Wreski
ity-update HTTP/1.1" 500 12704 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" 2/2408334 915/21235/12704 Thanks, Dave El mar., 20 abr. 2021 4:03, Dave Wreski escribió: Hi, I have an apache-2.4.46 system on fedora33 and havin

[users@httpd] Random 500 errors

2021-04-19 Thread Dave Wreski
Hi, I have an apache-2.4.46 system on fedora33 and having weird 500 errors that I can't explain. 72.70.38.104 - - [19/Apr/2021:21:38:56 -0400] "GET /advisories/debian/debian-dsa-2944-1-gnutls26-security-update HTTP/1.1" 500 12704 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.c

[users@httpd] apache error 500 weirdness

2021-04-11 Thread Dave Wreski
Hi, I have an apache-2.4.46 system with php-7.4.16 on fedora33 site using cloudflare, although I'm not sure if it's related. This is an entry from our logs from a cloudflare IP: 172.68.34.214 - - [11/Apr/2021:21:22:11 -0400] "GET /advisories/gentoo/gentoo-glsa-200903-10-irrlicht-user-assiste

[users@httpd] AH00717: Premature end of cache headers

2021-03-26 Thread Dave Wreski
Hi, I have an apache 2.4.46 system on fedora33 with php-7.4.16 and seeing the following errors pretty regularly on my joomla system: [Fri Mar 26 19:20:38.768857 2021] [cache_disk:error] [pid 2202202:tid 2202272] (70014)End of file found: [client 172.69.19.132:44102] AH00717: Premature end of

[users@httpd] cache_disk:error - AH00708: Cannot open data file

2020-01-17 Thread Dave Wreski
Hi all, I have an apache 2.4.41 system on fedora31 and having a disk cache problem: [Fri Jan 17 12:43:07.136283 2020] [cache_disk:error] [pid 188213:tid 14725280512] (2)No such file or directory: [client 40.108.163.149:59878] AH00708: Cannot open data file /var/cache/httpd/by1/Efa/HuNQwPy

[users@httpd] mod_cache_disk: AH00708: Cannot open data file

2019-04-01 Thread Dave Wreski
Hi all, I have a apache-2.4.34 system on fedora28 and have set up disk caching using "CacheQuickHandler off" to go through apache before being fetched from the cache and having some problems. [Mon Apr 01 14:16:48.908257 2019] [cache_disk:error] [pid 5955:tid 140305609242368] (2)No such file

[users@httpd] AH00708: Cannot open data file

2019-02-10 Thread Dave Wreski
Hi, I have a fedora28 system with httpd-2.4.34-3.fc28.x86_64 and having a problem with caching. I believe this started happening after we recently changed the hostname from "webstage" to "www". [Sun Feb 10 10:42:26.731666 2019] [cache_disk:error] [pid 997:tid 140189099861760] (2)No such file

[users@httpd] Apache SuexecUserGroup and group permissions

2019-01-09 Thread Dave Wreski
Hi, I'm having trouble with permissions and ownership on a fedora28 system with apache-2.4 and joomla-3.9. I'd like to be able to have only the minimal number of files necessary to be owned by apache and have an ssh/sftp user have access to read and write every file in the document root. I'm

[users@httpd] Apache disk cache or app-based?

2018-10-23 Thread Dave Wreski
Hi, We're in the process of rebuilding one of our websites using a more modern version of joomla. The developers want to use an app called SpeedCache, which apparently provides browser cache as well as caching of the general site elements. I'm more inclined to use the built-in apache disk ca