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. 2024-04-28, 21:44:32

Author Topic: nginx + microcache  (Read 7088 times)

0 Members and 1 Guest are viewing this topic.

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
nginx + microcache
« on: 2016-02-11, 04:57:45 »
i dont know with cache is good with php7 now bcos i'm gonna install wordpress so i consider so much about cache nginx + wordpress cache.

how can i just set only nginx + microcache?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginx + microcache
« Reply #1 on: 2016-02-11, 05:13:15 »
Cache plugins for php like xcache, apc, opcache and memcached is different purpose compare to web server cache (like enable cache in nginx) and application cache (hypercache in wordpress).

Example for server of this forum use/enable/install:
1. php cache -> enable apc and memcached
2. application cache -> enable cache feature in wordfence for wordpress
3. microcache -> enable microcache for hiawatha (already enable in nginx)
4. page-speed -> install google mod-pagespeed for apache
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: nginx + microcache
« Reply #2 on: 2016-02-11, 18:47:20 »
num1 is for php cache so which one is best for cache? and best for configuration in application cache (in wordpress i wanna use w3tc. i use wordfence too but i dont enable cache for wordfence.)
so i dont need to enable microcache in nginx? how can i check it?
im also wanna install mod page-speed but i just wanna use nginx only..so is there any mod like page-speed for nginx?

ps:
1) i can not choose from PHP Used. i dont see PHP Type, Apache Memory Optimize in webserver configure. how can i use php_fpm or fastcgi or mod_php? which one is good and fast? in Php Branch i chose Php70w.
2) i wanna convert mysql to mariadb utf8 but the function is not working.
« Last Edit: 2016-02-11, 19:11:08 by peih »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginx + microcache
« Reply #3 on: 2016-02-12, 03:01:41 »
1. Install php in 'install multiple php' first (or run 'sh /script/phpm-all-install' from ssh) until you see 'multiple php already installed' for choose different php in 'php used'
2. Feature like 'php type' and 'apache optimize' only for apache or proxy (like nginx-proxy)
3. Better choose php-fpm for 'php type'
4. Better stay php54 for 'php branch' but use choose php like you want in 'php used'
5. Use 'sh /script/mysql-convert --engine=myisam --utf8=yes'
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: nginx + microcache
« Reply #4 on: 2016-02-16, 18:36:15 »
so if i use nginx only, microcache is enable as default and i dont have chosen in "php type" but i can choose whatever as php7 in "php-used".
so do i need to enable php cache and what and how php cache for nginx i can enable here?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginx + microcache
« Reply #5 on: 2016-02-16, 19:09:05 »
Cache plugins/modules in web server (like apache), php (like php 5.4) and applications (like wordpress) have different purpose. We can combine all of them.

Example for server of this forum, combining microcache in hiawatha, apc and memcached in php and enable caching feature on SMF (application of this forum).
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: nginx + microcache
« Reply #6 on: 2016-02-17, 07:50:00 »
yes thats right.
now i have microcache for nginx, but i need to know how to enable zend or apc and memcached in php?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginx + microcache
« Reply #7 on: 2016-02-17, 08:14:48 »
Inform here 'dir -l /opt/php*m/etc/php.d/*{apc,memcached}.nonini'
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: nginx + microcache
« Reply #8 on: 2016-02-17, 22:52:58 »
dir: cannot access /opt/php*m/etc/php.d/*apc.nonini: No such file or directory
dir: cannot access /opt/php*m/etc/php.d/*memcached.nonini: No such file or directory

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginx + microcache
« Reply #9 on: 2016-02-18, 00:49:38 »
So, you need install phpXYm first from panel (under 'webserver configure') or from ssh with 'sh /script/phpm-all-install'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: nginx + microcache
« Reply #10 on: 2016-02-18, 20:53:34 »
-rw-r--r-- 1 root root 3378 Feb 18 01:19 /opt/php53m/etc/php.d/apc.nonini
-rw-r--r-- 1 root root  297 Feb 18 01:19 /opt/php53m/etc/php.d/memcached.nonini
-rw-r--r-- 1 root root 3069 Feb 18 01:22 /opt/php54m/etc/php.d/apc.nonini
-rw-r--r-- 1 root root 4587 Feb 18 01:22 /opt/php55m/etc/php.d/50-memcached.nonini
-rw-r--r-- 1 root root 4587 Feb 18 01:24 /opt/php56m/etc/php.d/50-memcached.nonini

what should i use? apc or memcache?
i would like to use php7*m with nginx but its seemly there is no php cached for php7. do you recommend what is optimize php cached for nginx i should you?

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: nginx + microcache
« Reply #11 on: 2016-02-18, 20:56:05 »
this is my sysinfo:

sh /script/sysinfo
A. Control Panel:
   - Kloxo-MR: 7.0.0.b-2016021403
   - Web: hiawatha-10.1.0-f.6.mr.el6.x86_64
   - PHP: php54s-5.4.45-2.w6 (cgi mode)
B. Plateform:
   - OS: CentOS release 6.7 (Final) x86_64
   - Hostname: sv1.andientronven.com
C. Services:
   1. MySQL: MariaDB-server-10.0.23-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-2.w6
        * php55m-5.5.32-1.ius.el6
        * php56m-5.6.18-1.ius.el6
        * php70m-7.0.3-1.w6
      - 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

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginx + microcache
« Reply #12 on: 2016-02-18, 21:00:49 »
-rw-r--r-- 1 root root 3378 Feb 18 01:19 /opt/php53m/etc/php.d/apc.nonini
-rw-r--r-- 1 root root  297 Feb 18 01:19 /opt/php53m/etc/php.d/memcached.nonini
-rw-r--r-- 1 root root 3069 Feb 18 01:22 /opt/php54m/etc/php.d/apc.nonini
-rw-r--r-- 1 root root 4587 Feb 18 01:22 /opt/php55m/etc/php.d/50-memcached.nonini
-rw-r--r-- 1 root root 4587 Feb 18 01:24 /opt/php56m/etc/php.d/50-memcached.nonini

what should i use? apc or memcache?
i would like to use php7*m with nginx but its seemly there is no php cached for php7. do you recommend what is optimize php cached for nginx i should you?

Rename this *.nonini to *_used.ini (example apc.nonini to apc_used.ini). And then run 'sh /script/restart-web -y'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: nginx + microcache
« Reply #13 on: 2016-02-22, 05:24:15 »
sorry i dont know how to use kloxo mr.

i switched from apache to nginx and use php7, now site is not working. do i need to move inf from apache (domain config - i dont know where is it located) to nginx?

i dont know why part A -web: hiawatha is still there. and php still php54/ part C-PHP: Branch still php54 but php used is php7 and part C-5. Hiawatha still unused not uninstalled. last one, part C-cached is still uninstalled.

----------------------------------------------

i did a fix-all then restart-all but there's nginx error start.

*** Process for NGINX service ***
Starting nginx: nginx: [emerg] open() "/opt/configs/nginx/conf/globals/switch_standard_ssl.conf" failed (2: No such file or directory) in /opt/configs/nginx/conf/defaults/init.conf:59
                                                           [FAILED]
  - Process: reload
Reloading nginx:                                           [FAILED]

---------------------------------------------------------------
here is the info:
A. Control Panel:
   - Kloxo-MR: 7.0.0.b-2016021403
   - Web: hiawatha-10.1.0-f.6.mr.el6.x86_64
   - PHP: php54s-5.4.45-2.w6 (cgi mode)

B. Plateform:
   - OS: CentOS release 6.7 (Final) x86_64
   - Hostname: sv1.adtv.com
C. Services:
   1. MySQL: MariaDB-server-10.0.23-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-2.w6
        * php55m-5.5.32-1.ius.el6
        * php56m-5.6.18-1.ius.el6
        * php70m-7.0.3-1.w6
      - Used: php70m
   3. Httpd: --uninstalled--
      - PHP Type: php-fpm_event
   4. Lighttpd: --uninstalled--
   5. Hiawatha: --unused--
   6. Nginx: nginx-1.9.11-1.el6.ngx.x86_64
   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
« Last Edit: 2016-02-22, 05:45:26 by peih »

Offline peih

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: nginx + microcache
« Reply #14 on: 2016-02-23, 21:09:07 »
now i got 502 bad gateway
i tried to restart services but i got issue: Reloading php70m-fpm: [FAILED]. i could not stop it or restart it.
i chose php5.4 in PHP-Used, everything is good again.
so is Php7-fpm still in processing?
« Last Edit: 2016-02-23, 22:25:58 by peih »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.041 seconds with 18 queries.

web stats analysis