MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: dlozev on 2015-09-23, 00:22:00

Title: Enable .htaccess
Post by: dlozev on 2015-09-23, 00:22:00
Hello, as far as I know .htaccess files is disabled in kloxo.But it needed. How can I enable it?
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-23, 01:34:44
This .htaccess is enable if choose apache or proxy (like nginx-proxy).
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-23, 08:49:30
I use apache, but not working. When I create an .htaccess file and enter any command just not working. Also .htaccess file can be seen from the browser.
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-23, 10:30:50
Inform here 'sh /script/sysinfo'.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-23, 10:51:54
Code: [Select]
A. Kloxo-MR: 7.0.0.b-2015091201
   - Web: hiawatha-9.14.0-f.6.mr.el6.x86_64
   - PHP: php54s-5.4.45-1.ius.el6 (cgi mode)
B. Plateform:
   - OS: CentOS release 6.7 (Final) x86_64
   - Hostname: localhost.localdomain
C. Services:
   1. MySQL: MariaDB-server-10.0.21-1.el6.x86_64
   2. PHP:
      - Branch: php55u-cli-5.5.29-1.ius.el6.x86_64
      - Multiple:
        * php52m-5.2.17-102.mr.el6
        * php53m-5.3.29-1.ius.el6
        * php54m-5.4.45-1.ius.el6
        * php55m-5.5.29-1.ius.el6
        * php56m-5.6.13-1.ius.el6
      - Used: --Use PHP Branch--
   3. Httpd: httpd-2.2.31-1.mr.el6.x86_64
      - PHP Type: php-fpm_event
   4. Lighttpd: --uninstalled--
   5. Hiawatha: --unused--
   6. Nginx: --uninstalled--
   7. Cache: trafficserver-5.3.0-1.el6.x86_64
   8. Dns: bind-9.9.7-1.mr.el6.x86_64
   9. Qmail: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
      - with: courier-imap-toaster-4.1.2-1.3.18.mr.el6.x86_64
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-23, 11:15:59
Try not use Webcache (like trafficserver) and better use with nginx-proxy or hiawatha-proxy.

BTW, change your hostname with FQDN qualification (use server1.yourdomain.com instead server1).
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-23, 12:00:33
I set FQDN in /etc/sysconfig/network and again dont send mails...

Code: [Select]
Received: (qmail 4074 invoked for bounce); 23 Sep 2015 09:12:59 -0000
Date: 23 Sep 2015 09:12:59 -0000
From: MAILER-DAEMON@localhost.localdomain
To: anonymous@localhost.localdomain
Subject: failure notice

Hi. This is the qmail-send program at localhost.localdomain.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<dimityr.lozev@gmail.com>:
User and password not set, continuing without authentication.
<dimityr.lozev@gmail.com> 74.125.195.26 failed after I sent the message.
Remote host said: 550-5.7.1 [78.83.40.187      12] Our system has detected that this message is
550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail,
550-5.7.1 this message has been blocked. Please visit
550 5.7.1  https://support.google.com/mail/answer/188131 for more information. xm4si9870537wib.90 - gsmtp

--- Below this line is a copy of the message.

Return-Path: <anonymous@localhost.localdomain>
Received: (qmail 4059 invoked by uid 498); 23 Sep 2015 09:12:59 -0000
Date: 23 Sep 2015 09:12:59 -0000
Message-ID: <20150923091259.4058.qmail@localhost.localdomain>
To: dimityr.lozev@gmail.com
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-23, 12:22:15
Not set hostname to FQDN may trouble to send mail.

In your email, localhost.localdomain is your hostname.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-23, 14:00:00
Where should i chane?
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-23, 15:08:24
In /etc/sysconfig/network and then reboot and then run 'sh /script/cleanup'.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-24, 03:16:18
After run the script 'sh /script/cleanup', I can not loigin any account in Kloxo.
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-24, 04:04:43
Try 'sh /script/restart-all -y' and inform here the result.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-24, 08:56:38
Again I can not login.

Code: [Select]
[root@ns3 ~]# sh /script/restart-all -y

Shutting down system logger:                               [  OK  ]
Starting system logger:                                    [  OK  ]
-------------------------------------------------------------------

 ERROR! MySQL server PID file could not be found!
Starting MySQL... ERROR!
-------------------------------------------------------------------

Stopping named: .                                          [  OK  ]
/etc/sysconfig/network: line 2: unexpected EOF while looking for matching `"'
/etc/sysconfig/network: line 3: syntax error: unexpected end of file
Starting named:                                            [  OK  ]
-------------------------------------------------------------------

Stopping traffic_cop:                                      [  OK  ]
Stopping traffic_manager:                                  [  OK  ]
Stopping traffic_server:                                   [  OK  ]
Starting Apache Traffic Server:                            [  OK  ]
-------------------------------------------------------------------

/etc/sysconfig/network: line 2: unexpected EOF while looking for matching `"'
/etc/sysconfig/network: line 3: syntax error: unexpected end of file
/etc/sysconfig/network: line 3: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires
Stopping php-fpm:                                          [  OK  ]
pkill to make sure stopped
/etc/sysconfig/network: line 2: unexpected EOF while looking for matching `"'
/etc/sysconfig/network: line 3: syntax error: unexpected end of file
/etc/sysconfig/network: line 3: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires
Starting php-fpm:                                          [  OK  ]
-------------------------------------------------------------------

Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]
-------------------------------------------------------------------

Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
-------------------------------------------------------------------


*** Process for QMAIL service ***
Stopping qmail-toaster: svscan qmail logging.
Starting qmail-toaster: svscan.
-------------------------------------------------------------------

- For help, type '/script/restart-mail [--help|-h]'
-------------------------------------------------------------------

/etc/sysconfig/network: line 2: unexpected EOF while looking for matching `"'
/etc/sysconfig/network: line 3: syntax error: unexpected end of file
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
-------------------------------------------------------------------

/etc/sysconfig/network: line 2: unexpected EOF while looking for matching `"'
/etc/sysconfig/network: line 3: syntax error: unexpected end of file
* kloxo-phpcgi ('php54s' in 'cgi' mode): No need to start
Stopping kloxo-hiawatha:                                   [  OK  ]
Starting kloxo-hiawatha:                                   [  OK  ]
-------------------------------------------------------------------
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-24, 10:24:05
There are something wrong with '/etc/sysconfig/network' content!
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-24, 14:10:43
Now I fix this, but when I try to change admin password via ssh, the result is:

Code: [Select]
parent_doesnt_exist: nname:
Just now I will reinstall OS and Kloxo MR. And will try again.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-24, 19:03:49
After Fresh Install again the .htaccess file not working. AllowOverride is set to - All
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-24, 19:25:32
Inform here your .htaccess content and 'sh /script/sysinfo'.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-24, 19:43:26
Code: [Select]
deny from all
Code: [Select]
A. Kloxo-MR: 7.0.0.b-2015091201
   - Web: hiawatha-9.14.0-f.6.mr.el6.x86_64
   - PHP: php54s-5.4.45-1.ius.el6 (cgi mode)
B. Plateform:
   - OS: CentOS release 6.7 (Final) x86_64
   - Hostname: ns3.compidev.eu
C. Services:
   1. MySQL: MariaDB-server-10.0.21-1.el6.x86_64
   2. PHP:
      - Branch: php54-cli-5.4.45-1.ius.el6.x86_64
      - Used: --Use PHP Branch--
   3. Httpd: httpd-2.2.31-1.mr.el6.x86_64
      - PHP Type: [unknown]
   4. Lighttpd: --uninstalled--
   5. Hiawatha: --unused--
   6. Nginx: --uninstalled--
   7. Cache: --uninstalled--
   8. Dns: bind-9.9.7-1.mr.el6.x86_64
   9. Qmail: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
      - with: courier-imap-toaster-4.1.2-1.3.18.mr.el6.x86_64
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-24, 20:09:24
1. Make sure select 'php type' in 'webserver configure'. Better choose 'php-fpm_event' and enable 'secondary php'

2. Read http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny about deny (also allow)
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-24, 21:24:16
Again the same result.

https://stl.bg
http://dlozev.eu/.htaccess
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-25, 01:54:21
Try 'sh /script/fix-chownchmod'.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-25, 06:17:11
Nothing...
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-25, 06:32:51
What's about different rewrite rule?. Also not work?.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-25, 06:39:35
Yes, also not work.
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-25, 06:57:11
It's weird!. Inform again your 'sh /script/sysinfo'.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-25, 07:59:27
Code: [Select]
A. Kloxo-MR: 7.0.0.b-2015091201
   - Web: hiawatha-9.14.0-f.6.mr.el6.x86_64
   - PHP: php54s-5.4.45-1.ius.el6 (cgi mode)
B. Plateform:
   - OS: CentOS release 6.7 (Final) x86_64
   - Hostname: ns3.compidev.eu
C. Services:
   1. MySQL: MariaDB-server-10.0.21-1.el6.x86_64
   2. PHP:
      - Branch: php54-cli-5.4.45-1.ius.el6.x86_64
      - Multiple:
        * php52m-5.2.17-102.mr.el6
        * php53m-5.3.29-1.ius.el6
        * php54m-5.4.45-1.ius.el6
        * php55m-5.5.29-1.ius.el6
        * php56m-5.6.13-1.ius.el6
      - Used: --Use PHP Branch--
   3. Httpd: httpd-2.2.31-1.mr.el6.x86_64
      - PHP Type: php-fpm_event
   4. Lighttpd: --uninstalled--
   5. Hiawatha: --unused--
   6. Nginx: --uninstalled--
   7. Cache: --uninstalled--
   8. Dns: bind-9.9.7-1.mr.el6.x86_64
   9. Qmail: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
      - with: courier-imap-toaster-4.1.2-1.3.18.mr.el6.x86_64
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-25, 08:28:51
Possible your code not work with assumption (1) wrong code/location, (2) apache bug or (3) certain parameters not work in .htaccess environment.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-25, 08:55:37
What should I do in case if certain parameters in .htaccess not work?
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-25, 09:07:57
What should I do in case if certain parameters in .htaccess not work?
What's do you want/need?.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-25, 09:09:50
Need*
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-25, 09:19:40
Need*
Please explain what's your need.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-25, 11:55:36
I want to fix the problem.
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-25, 12:23:16
Your .htaccess content not work in my test server but rewrite-rule for wordpress work perfectly.
Title: Re: Enable .htaccess
Post by: dlozev on 2015-09-25, 13:25:00
I want to use this rules in my htaccess file. How to fix this?
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-09-25, 13:58:44
Not sure, but maybe related to https://support.aiso.net/index.php?/Knowledgebase/Article/View/302/14/htaccess-ip-address-blockallow-rules-may-not-work
Title: Re: Enable .htaccess
Post by: dlozev on 2015-10-17, 09:27:22
That does not help me.
Title: Re: Enable .htaccess
Post by: putude on 2015-10-30, 17:39:58
I don't know if this treat still valid or not.
mr Mustafa, I just wondering if .htaccess works with Nginx?
if so, @dlozev's .htaccess will not work because he use Nginx.
Title: Re: Enable .htaccess
Post by: MRatWork on 2015-10-30, 18:42:04
.htaccess only work for pure nginx (but work perfectly for nginx-proxy because nginx-poxy mean nginx in front and apache/httpd in backend).