Page 16 of 16 FirstFirst ... 6141516
Results 301 to 308 of 308

Thread: Reverse-proxy NGINX + Apache on Directadmin powered server with CB 2.x

  1. #301
    Join Date
    Jun 2017
    Location
    ZS
    Posts
    65
    Hi, I have change server conf. to ngix_apache (before apache) and build this conf. Website is runing but when I check loadtime in tools.pingdom I can see that pagesize increase from 2.5 MB to 3.8 MB and load time from 1.99 to 2.40s

    In pagespeed insights I see thaht mod Gzip is not runing but using another tools to test gzip compression I see that gzip is ON
    Last edited by Mattpl; 08-13-2018 at 02:05 PM.
    Working with Deb 8/DA/CB2/MariaDB10.0/PHP7 | https://szukampracy.pl & https://ksservice.pl & https://pramed.pl

  2. #302
    Join Date
    Jun 2017
    Posts
    11
    Hi,

    For some performance gain i decided to try the nginx_apache setup on one of our servers. Everything looks good and i went form 5 sec. load times to 2sec. load times.

    i do however have a weird issue with some .htaccess rules. Since i mainly have WordPress installations running, we have a .htaccess in the wp-content folder only allowing certain filetypes:

    Code:
    Order deny,allow
    Deny from all
    <Files ~ ".(xml|css|jpe?g|png|gif|js|ttf|otf|eot|pdf|woff|woff2)$">
    	Allow from all
    </Files>
    On apache this would block the use of unknown or unwanted extensions. For some strange reason this does seem to block CSS when running the nginx_apache combination. When rummaging through the error logs i encounter a lot of these:

    [Thu Sep 06 09:12:02.566458 2018] [access_compat:error] [pid 26002:tid 139701260252928] [client aa.bb.cc.dd:0] AH01797: client denied by server configuration: uri /wp-content/plugins/power-builder/framework/assets/js/frontend-builder-global-functions.js,qver=1.0.0.pagespeed.jm.as9jzpvBo3.js, referer: https://dmain.com/
    [Thu Sep 06 09:12:02.593106 2018] [access_compat:error] [pid 26002:tid 139701243467520] [client aa.bb.cc.dd:0] AH01797: client denied by server configuration: uri /wp-content/plugins/tm-header-banner/cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/select2.js,qver=0.2.9.pagespeed.jm.iVZw-D3mI6.js, referer: https://domain.com/

    Which is weird because the .js is allowed by the .htaccess rule. So, what could cause this weird behavior?

  3. #303
    Join Date
    Jun 2017
    Location
    ZS
    Posts
    65
    someone? I look at /etc/nginx/nginx-gzip.conf

    and gzip is on
    gzip on;
    gzip_static on;
    gzip_disable "msie6";
    gzip_http_version 1.1;
    gzip_vary on;
    gzip_comp_level 6;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/x-javascript text/x$
    gzip_buffers 16 8k;
    but tools like pagespeedinsight etc. shows error about compression - " Turn od gzip compression"

    Testing with Curl
    HTTP/1.1 200 OK
    Server: nginx
    Date: Thu, 13 Sep 2018 13:36:29 GMT
    Connection: keep-alive
    X-Powered-By: PHP/7.0.31
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate
    Pragma: no-cache
    Vary: User-Agent
    Content-Type: text/html; charset=UTF-8
    Connection: keep-alive
    OK I have turn off CWAF and gzip is on
    Last edited by Mattpl; 09-13-2018 at 06:49 AM.
    Working with Deb 8/DA/CB2/MariaDB10.0/PHP7 | https://szukampracy.pl & https://ksservice.pl & https://pramed.pl

  4. #304
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,273
    @Paarsch,

    I guess pagespeed is the issue, did you try to disable pagespeed for testing?



    @Mattpl,

    Did you try to test with gtmetrix.com? Are those URLs to media files for which GZIP is not enabled are hosted on your server?

    Let us know your real domain name, so that we could check it for you.

  5. #305
    Join Date
    Jun 2017
    Location
    ZS
    Posts
    65
    Quote Originally Posted by zEitEr View Post
    @Paarsch,

    I guess pagespeed is the issue, did you try to disable pagespeed for testing?



    @Mattpl,

    Did you try to test with gtmetrix.com? Are those URLs to media files for which GZIP is not enabled are hosted on your server?

    Let us know your real domain name, so that we could check it for you.
    thanks I have write thaht problem solved I have turn off CWAF and Rules and gzip is on. You could check https://szukampracy.pl

    Now I must try to opt TTFB, but I think thaht I have problem with scripts / mysql because another cms like WP have good TTFB ->http://blog.szukampracy.pl
    Maybe do you have any idea how to check this? I try to use munin but have error after install from ssh root.

    //
    OK I have install yesterday munin and see thaht disk usage is very high, zEitEr Can you look at this stats?
    Last edited by Mattpl; 09-13-2018 at 11:25 PM.
    Working with Deb 8/DA/CB2/MariaDB10.0/PHP7 | https://szukampracy.pl & https://ksservice.pl & https://pramed.pl

  6. #306
    Join Date
    Jan 2011
    Posts
    160
    Quote Originally Posted by Strator View Post
    Sounded good, but didn't work unfortunately. I placed a copy of nginx-defaults.conf into custombuild/custom/nginx/conf/, then edited it accordingly and ran:

    ./build rewrite_confs

    from the custombuild directory.

    Nginx complained about those same definitions that I had commented out in the custom version of nginx-defaults.conf, and refused to start.
    I revisited this once more and finally got it going. Turns out that I had the path wrong - it is NOT /usr/local/directadmin/custombuild/custom/ but rather /usr/local/directadmin/custombuild/configure/ - also, sind I have nginx set up as a reverse proxy, the full path is:

    /usr/local/directadmin/custombuild/configure/nginx_reverse/conf

    You don't need to move any files there, as they already live in that folder (if they don't, it's the wrong folder). Hope that helps someone.

  7. #307
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,273
    You should never modify anything under /usr/local/directadmin/custombuild/configure/, all custom changes should be done only under /usr/local/directadmin/custombuild/custom/, that's the only place where you can copy customized configs and they won't be overwritten by directadmin.

    Directadmin will overwrite all your changes under /usr/local/directadmin/custombuild/configure/ with Directadmin/custombuild update.


    Related:

    - Add custom modules to nginx with custombuild 2.0
    - Adding custom modules to apache for custombuild
    - I wish to customize /etc/httpd/conf/httpd.conf and not have custombuild revert it
    - Using custom configs for PhpMyAdmin, SquirrelMail and Roundcube

  8. #308
    Join Date
    Jan 2011
    Posts
    160
    Quote Originally Posted by zEitEr View Post
    You should never modify anything under /usr/local/directadmin/custombuild/configure/, all custom changes should be done only under /usr/local/directadmin/custombuild/custom/, that's the only place where you can copy customized configs and they won't be overwritten by directadmin.

    Directadmin will overwrite all your changes under /usr/local/directadmin/custombuild/configure/ with Directadmin/custombuild update.


    Related:

    - Add custom modules to nginx with custombuild 2.0
    - Adding custom modules to apache for custombuild
    - I wish to customize /etc/httpd/conf/httpd.conf and not have custombuild revert it
    - Using custom configs for PhpMyAdmin, SquirrelMail and Roundcube
    Thanks for the heads up - now I think I finally understand how this works. So originally my only mistake was that I put the file into /nginx instead of /nginx_reverse. It is now in:

    /usr/local/directadmin/custombuild/custom/nginx_reverse/conf

    and everything works great. Thanks again!

Page 16 of 16 FirstFirst ... 6141516

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •