Re: (Help please): script error suddenly preventing wki access

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: (Help please): script error suddenly preventing wki access

Amanuensis (Whitby)
To follow up on my previous request for help:

Thank you to Julian for pointing out the known CGI problem. My hosting service eventually admitted that they had upgraded from Apache 2.2 to 2.4, and I suppose that they must have changed the relevant perl module at the same time. These two events together would seem to account for my problems.

I haven't yet had success editing my .htaccess files to cope with the change of Apache version. The Foswiki config generator at http://foswiki.org/Support/ApacheConfigGenerator24 seems to not directly support the generation of .htaccess files, or am I missing something? The config generator at http://foswiki.org/Support/NewApacheConfigGenerator refers users of Apache 2.4 to the link above, and the Foswiki 1.1.9 distribution only includes examples with the Apache 2.2 syntax. Can anybody point me to a set of example .htaccess files with the Apache 2.4 syntax so I can do a sanity check on my edits?

To add to my confusion, I think that when changing my admin password I have messed up the .htpasswd file, so that now I can only log in as the administrator (I forgot that running htpasswd on the foswiki .htpasswd apparently breaks it because of the way email addresses are stored - easy to forget two years after installing the wiki)! Presumably I must now ask all users to re-register, or is it possible to replace the password field in .htpasswd with a temporary password and the known email address?

James
--
Dr James Whitby
Managing Director
Amanuensis GmbH
Gürbestrasse 17
CH-3125 Toffen
SWITZERLAND
Tel. (Bern office): +41 31 3812726
Tel. (mobile) +41 79 7739129

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: (Help please): script error suddenly preventing wki access

Lynnwood Brown
In regards to revising your .htaccess files for Apache 2.4, you can copy the permission settings generated by http://foswiki.org/Support/ApacheConfigGenerator24 and use that in place of similar permissions in your htaccess files. For example, the old version the bin directory .htaccess had these lines:
   Order Allow,Deny
   Allow from all
   Deny from env=blockAccess

Under Apache 2.4, this would be replaced with these lines:
    <RequireAll>
        Require all granted
        Require not env blockAccess
    </RequireAll>

Likewise, in the .htaccess file templates for other directories has this permission:
    deny from all
…which is replace with 
    Require all denied

You could set whatever other conditions you want in  ApacheConfigGenerator24 and it would generate the correct settings for your htaccess files.

Regarding messing up the .htpassword file by using the htpasswd command, the damage done is limited: it only deletes the email address for the user you manually changed the password for. Entries for other users would be untouched. You can also manually edit the .htpasswd file and add back your email address. Just look at the other entries to see the syntax - basically add a colon after the password string and then the email address. You can not manually add a password to the file because it is an encrypted string.

Hope this helps,
Lynnwood

On Mar 18, 2015, at 5:31 PM, whitby <[hidden email]> wrote:

To follow up on my previous request for help:

Thank you to Julian for pointing out the known CGI problem. My hosting service eventually admitted that they had upgraded from Apache 2.2 to 2.4, and I suppose that they must have changed the relevant perl module at the same time. These two events together would seem to account for my problems.

I haven't yet had success editing my .htaccess files to cope with the change of Apache version. The Foswiki config generator at http://foswiki.org/Support/ApacheConfigGenerator24 seems to not directly support the generation of .htaccess files, or am I missing something? The config generator at http://foswiki.org/Support/NewApacheConfigGenerator refers users of Apache 2.4 to the link above, and the Foswiki 1.1.9 distribution only includes examples with the Apache 2.2 syntax. Can anybody point me to a set of example .htaccess files with the Apache 2.4 syntax so I can do a sanity check on my edits?

To add to my confusion, I think that when changing my admin password I have messed up the .htpasswd file, so that now I can only log in as the administrator (I forgot that running htpasswd on the foswiki .htpasswd apparently breaks it because of the way email addresses are stored - easy to forget two years after installing the wiki)! Presumably I must now ask all users to re-register, or is it possible to replace the password field in .htpasswd with a temporary password and the known email address?

James
--
Dr James Whitby
Managing Director
Amanuensis GmbH
Gürbestrasse 17
CH-3125 Toffen
SWITZERLAND
Tel. (Bern office): +41 31 3812726
Tel. (mobile) +41 79 7739129
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: (Help please): script error suddenly preventing wki access

George Clark-2
One more thing on configuration compatibility.   If you check with your hosting site,  ask if they can enable mod_access_compat on apache.    With that module enabled on Foswiki 2.4,  the old syntax from Foswiki 2.2 should be accepted.   See http://httpd.apache.org/docs/current/mod/mod_access_compat.html

George

On 03/18/2015 06:56 PM, Lynnwood Brown wrote:
In regards to revising your .htaccess files for Apache 2.4, you can copy the permission settings generated by http://foswiki.org/Support/ApacheConfigGenerator24 and use that in place of similar permissions in your htaccess files. For example, the old version the bin directory .htaccess had these lines:
   Order Allow,Deny
   Allow from all
   Deny from env=blockAccess

Under Apache 2.4, this would be replaced with these lines:
    <RequireAll>
        Require all granted
        Require not env blockAccess
    </RequireAll>

Likewise, in the .htaccess file templates for other directories has this permission:
    deny from all
…which is replace with 
    Require all denied

You could set whatever other conditions you want in  ApacheConfigGenerator24 and it would generate the correct settings for your htaccess files.

Regarding messing up the .htpassword file by using the htpasswd command, the damage done is limited: it only deletes the email address for the user you manually changed the password for. Entries for other users would be untouched. You can also manually edit the .htpasswd file and add back your email address. Just look at the other entries to see the syntax - basically add a colon after the password string and then the email address. You can not manually add a password to the file because it is an encrypted string.

Hope this helps,
Lynnwood

On Mar 18, 2015, at 5:31 PM, whitby <[hidden email]> wrote:

To follow up on my previous request for help:

Thank you to Julian for pointing out the known CGI problem. My hosting service eventually admitted that they had upgraded from Apache 2.2 to 2.4, and I suppose that they must have changed the relevant perl module at the same time. These two events together would seem to account for my problems.

I haven't yet had success editing my .htaccess files to cope with the change of Apache version. The Foswiki config generator at http://foswiki.org/Support/ApacheConfigGenerator24 seems to not directly support the generation of .htaccess files, or am I missing something? The config generator at http://foswiki.org/Support/NewApacheConfigGenerator refers users of Apache 2.4 to the link above, and the Foswiki 1.1.9 distribution only includes examples with the Apache 2.2 syntax. Can anybody point me to a set of example .htaccess files with the Apache 2.4 syntax so I can do a sanity check on my edits?

To add to my confusion, I think that when changing my admin password I have messed up the .htpasswd file, so that now I can only log in as the administrator (I forgot that running htpasswd on the foswiki .htpasswd apparently breaks it because of the way email addresses are stored - easy to forget two years after installing the wiki)! Presumably I must now ask all users to re-register, or is it possible to replace the password field in .htpasswd with a temporary password and the known email address?

James
--
Dr James Whitby
Managing Director
Amanuensis GmbH
Gürbestrasse 17
CH-3125 Toffen
SWITZERLAND
Tel. (Bern office): +41 31 3812726
Tel. (mobile) +41 79 7739129
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: (Help please): script error suddenly preventing wki access

Heath Raftery-2
In reply to this post by Lynnwood Brown
James,

We switched over to Apache 2.4 last year and had a long period of pain
getting all our htaccess files across all our sites working. FWIW, often
the problem was that despite error messages leading us that way, the
issue wasn't in the htaccess files themselves. Often what we had to do
was add an "AllowOverride" clause to the site's Apache conf file in
/etc/apache2. A typical clause might look like this:

<Directory />
     AllowOverride All
</Directory>

This allows htaccess files to work at all in that directory.

We didn't actually have to do that for Foswiki because all our
configuration is in the conf file, and we don't currently override it in
htaccess files, but might be something to keep in mind if you continue
to have issues.

Regards,
Heath

On 19/03/2015 9:56 AM, Lynnwood Brown wrote:

> In regards to revising your .htaccess files for Apache 2.4, you can copy
> the permission settings generated by
> http://foswiki.org/Support/ApacheConfigGenerator24 and use that in place
> of similar permissions in your htaccess files. For example, the old
> version the bin directory .htaccess had these lines:
>     Order Allow,Deny
>     Allow from all
>     Deny from env=blockAccess
>
> Under Apache 2.4, this would be replaced with these lines:
>      <RequireAll>
>          Require all granted
>          Require not env blockAccess
>      </RequireAll>
>
> Likewise, in the .htaccess file templates for other directories has this
> permission:
>      deny from all
> …which is replace with
>      Require all denied
>
> You could set whatever other conditions you want in
>   ApacheConfigGenerator24 and it would generate the correct settings for
> your htaccess files.
>
> Regarding messing up the .htpassword file by using the htpasswd command,
> the damage done is limited: it only deletes the email address for the
> user you manually changed the password for. Entries for other users
> would be untouched. You can also manually edit the .htpasswd file and
> add back your email address. Just look at the other entries to see the
> syntax - basically add a colon after the password string and then the
> email address. You can not manually add a password to the file because
> it is an encrypted string.
>
> Hope this helps,
> Lynnwood
>
> On Mar 18, 2015, at 5:31 PM, whitby <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>> To follow up on my previous request for help:
>>
>> Thank you to Julian for pointing out the known CGI problem. My hosting
>> service eventually admitted that they had upgraded from Apache 2.2 to
>> 2.4, and I suppose that they must have changed the relevant perl
>> module at the same time. These two events together would seem to
>> account for my problems.
>>
>> I haven't yet had success editing my .htaccess files to cope with the
>> change of Apache version. The Foswiki config generator at
>> http://foswiki.org/Support/ApacheConfigGenerator24 seems to not
>> directly support the generation of .htaccess files, or am I missing
>> something? The config generator at
>> http://foswiki.org/Support/NewApacheConfigGenerator refers users of
>> Apache 2.4 to the link above, and the Foswiki 1.1.9 distribution only
>> includes examples with the Apache 2.2 syntax. Can anybody point me to
>> a set of example .htaccess files with the Apache 2.4 syntax so I can
>> do a sanity check on my edits?
>>
>> To add to my confusion, I think that when changing my admin password I
>> have messed up the .htpasswd file, so that now I can only log in as
>> the administrator (I forgot that running htpasswd on the foswiki
>> .htpasswd apparently breaks it because of the way email addresses are
>> stored - easy to forget two years after installing the wiki)!
>> Presumably I must now ask all users to re-register, or is it possible
>> to replace the password field in .htpasswd with a temporary password
>> and the known email address?
>>
>> James


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss