Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2017-11-07, 17:20:09

Author Topic: mod_rewrite stopped working properly  (Read 976 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,944
  • Karma: +1/-0
    • View Profile
mod_rewrite stopped working properly
« on: 2016-09-20, 16:03:43 »
Something is wrong with the lastest nginx configs. All my sites stopped working properly with mod_rewrite.
« Last Edit: 2016-09-20, 16:26:03 by Spacedust »

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: mod_rewrite stopped working properly
« Reply #1 on: 2016-09-20, 16:35:43 »
What's your mod_rewrite code?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,944
  • Karma: +1/-0
    • View Profile
Re: mod_rewrite stopped working properly
« Reply #2 on: 2016-09-20, 19:24:50 »
What's your mod_rewrite code?.

This entry in domainname.com.conf for nginx is causing this:

Quote
   location ~* ^.+\.(jpe?g|gif|png|ico|css|pdf|js)$ {
      expires 7d;
      access_log off;
      root $var_rootdir;
   }

My .htaccess:

Code: [Select]
Options +FollowSymLinks
Options -Multiviews
RewriteEngine On
RewriteBase /

#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteRule ^install /instalator/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
RewriteRule (.*)/strony/([^a-zA-Z][0-9_/]*$) $1.php?strony=$2 [L]
RewriteRule (.*)/strony/([0-9_/]*)/(.*) $3 [L]
RewriteRule (.*)/strony/(.*) $2 [L]
RewriteRule tagi-xml/(.*).xml tagi/wyswietlacz_xml.php?tag=$1 [L]
RewriteRule news-xml/(.*).xml rss.php?strona=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule tagi/([?Ó????????ó???????a-zA-Z0-9\%\ \-\+\!\']*)/([^a-zA-Z][0-9_/]*$) tagi/wyswietlacz.php?tag=$1&page=$2 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule tagi/([?Ó????????ó???????a-zA-Z0-9\%\ \-\+\!\']+) tagi/wyswietlacz.php?tag=$1 [L]

RewriteRule news/([0-9]*)/([0-9]*)/([^a-zA-Z][0-9]*)/(.*).html$ kom.php?id_b=$1&id_n=$2&kom_page=$3 [L]
RewriteRule news/([0-9]*)/([0-9]*)/(.*).html$ kom.php?id_b=$1&id_n=$2 [L]
RewriteRule news/([0-9]*)/([0-9]*)/([^a-zA-Z][0-9]*)/(.*) $4 [L]
RewriteRule news/([0-9]*)/([0-9]*)/(.*) $3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
ErrorDocument 404 /tagi/404.php

RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* ? [F,L]
###Start Kloxo PHP config Area

### begin content - please not remove this line

#<IfModule mod_rewrite.c>
#       ## MR -- authentically for letsencrypt for webroot-based
#       RewriteRule /\.|^\.(?!well-known/) - [F]
#</FilesMatch>

### MR -- using php version different with default php
### 1. Using suphp
### - Copy between '#<FilesMatch \.php$>' to '#</FilesMatch>' and
###   then remove '#' from '#<FilesMatch', '#</FilesMatch>' and one of '#SetHandler'

#<FilesMatch \.php$>
        #SetHandler x-httpd-php
        #SetHandler x-httpd-php52
        #SetHandler x-httpd-php53
        #SetHandler x-httpd-php54
        #SetHandler x-httpd-php55
        #SetHandler x-httpd-php56
        #SetHandler x-httpd-php70
#</FilesMatch>

### OR

### 2. Using fcgid
### - Copy from '#Options' to '#FCGIWrapper' and
###   then remove '#' for one of '#FCGIWrapper'

#Options +ExecCGI
#<FilesMatch \.php$>
#       SetHandler fcgid-script
#</FilesMatch>
#FCGIWrapper /usr/bin/php-cgi .php
#FCGIWrapper /usr/bin/php52m-cgi .php
#FCGIWrapper /usr/bin/php53m-cgi .php
#FCGIWrapper /usr/bin/php54m-cgi .php
#FCGIWrapper /usr/bin/php55m-cgi .php
#FCGIWrapper /usr/bin/php56m-cgi .php
#FCGIWrapper /usr/bin/php70m-cgi .php

### end content - please not remove this line

###End Kloxo PHP config Area
« Last Edit: 2016-09-20, 19:26:25 by Spacedust »

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: mod_rewrite stopped working properly
« Reply #3 on: 2016-09-20, 19:57:36 »
Because in 'web features' include 'static files expire'. Try disabled it with change to '0' value.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,944
  • Karma: +1/-0
    • View Profile
Re: mod_rewrite stopped working properly
« Reply #4 on: 2016-09-21, 19:34:47 »
It does work - however it always executes rpm -q phpXX which takes a lot of time if you have an ATOM CPU. As a result I got "unable to establish encrypted connection" error.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,944
  • Karma: +1/-0
    • View Profile
Re: mod_rewrite stopped working properly
« Reply #5 on: 2016-09-22, 12:21:38 »
Mustafa can you do something about this 30 seconds timeout in Kloxo-MR just for panel ?

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: mod_rewrite stopped working properly
« Reply #6 on: 2016-09-22, 12:23:54 »
Mustafa can you do something about this 30 seconds timeout in Kloxo-MR just for panel ?
Reason?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,944
  • Karma: +1/-0
    • View Profile
Re: mod_rewrite stopped working properly
« Reply #7 on: 2016-09-22, 12:55:55 »
Mustafa can you do something about this 30 seconds timeout in Kloxo-MR just for panel ?
Reason?.

Probably some PHP-fpm settings. We need to make that much longer. The processes cannot exit itself due to the timeout. On slower machines executing longer commands is simply impossible.

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: mod_rewrite stopped working properly
« Reply #8 on: 2016-09-22, 15:58:36 »
Just probably?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,944
  • Karma: +1/-0
    • View Profile
Re: mod_rewrite stopped working properly
« Reply #9 on: 2016-09-23, 14:09:23 »
I would start with removing checking PHP rpm versions after each operation on domain. It really takes a lot of time on 8-core Intel Atom C2750 even with SSD drive.

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo

Page created in 0.042 seconds with 17 queries.

web stats analysis
 
Mirror created by MasterkinG32.CoM