Join the community today
Register Now

Drupal Is there any Drupal guides here?

Discussion in 'Blogs & CMS usage' started by Qu Don, Aug 27, 2017.

  1. Qu Don

    Qu Don Member

    31
    3
    8
    Aug 21, 2017
    Ratings:
    +6
    Local Time:
    10:54 PM
    What do you do to install Drupal through Centminmod
     
  2. Jimmy

    Jimmy Premium Member Premium Member

    1,147
    253
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +616
    Local Time:
    10:54 PM
    1.13.x
    MariaDB 10.1.x
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,634
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,308
    Local Time:
    1:54 PM
    Nginx 1.13.x
    MariaDB 5.5
  4. Qu Don

    Qu Don Member

    31
    3
    8
    Aug 21, 2017
    Ratings:
    +6
    Local Time:
    10:54 PM

    I'm trying to use Perusio's config but it all seems to go over my head. Do I have to replace the entire nginx directory created by Centmin. I keep getting an error that destination path already exists and is not empty.

    Also wouldnt that delete all the vhost configurations that have been placed there by Centmin?
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,634
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,308
    Local Time:
    1:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    There's difference between totally deleting vhost versus modifying it. It's very much just pattern recognition. You're mainly modifying some location contexts usually.

    And any non-centmin mod guides usually have reference to a location context for \.php which isn't needed as centmin mod has include file for /usr/local/nginx/conf/php.conf in vhost (unless their example location context for \.php differs greatly in content from /usr/local/nginx/conf/php.conf - in which case you can make a copy of /usr/local/nginx/conf/php.conf with another name, and make changes to settings in /usr/local/nginx/conf/php.conf to reflect their example location context for \.php). Example of modifying php.conf include for Magento to match the \.php context in example above this post Magento - Anyone can help me Nginx's directives for Magento 2?

    also read other Drupal tagged threads in this forum at Blogs & CMS usage i.e. Drupal - help drupal nginx config which did the opposite remove php.conf include and did the other way of setting a location context for \.php
     
  6. Qu Don

    Qu Don Member

    31
    3
    8
    Aug 21, 2017
    Ratings:
    +6
    Local Time:
    10:54 PM
    Im leaving this here for anyone who might encounter what I did. This is from a default Centmin beta installation with automatic free SSL certificates via Letsencrypt enabled
    • I have highlighted what needs to be changed in red [domain names and ssl ciphers]




    #x# HTTPS-DEFAULT
    server {

    server_name ghoxx.com www.ghoxx.com;
    return 302 https://$server_name$request_uri;
    include /usr/local/nginx/conf/staticfiles.conf;
    }

    # listen 80;
    # server_name ghoxx.com www.ghoxx.com;
    # return 302 https://$server_name$request_uri;

    server {
    listen 443 ssl http2;
    server_name ghoxx.com www.ghoxx.com;
    include /usr/local/nginx/conf/autoprotect/ghoxx.com/autoprotect-ghoxx.com.conf;
    root /home/nginx/domains/ghoxx.com/public;
    access_log /home/nginx/domains/ghoxx.com/log/access.log combined buffer=256k flush=5m;
    error_log /home/nginx/domains/ghoxx.com/log/error.log;

    include /usr/local/nginx/conf/ssl/ghoxx.com/ghoxx.com.crt.key.conf;
    include /usr/local/nginx/conf/ssl_include.conf;

    http2_max_field_size 16k;
    http2_max_header_size 32k;
    # mozilla recommended
    ssl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS;
    ssl_prefer_server_ciphers on;
    #add_header Alternate-Protocol 443:npn-spdy/3;

    # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts
    #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
    #add_header X-Frame-Options SAMEORIGIN;
    #add_header X-Xss-Protection "1; mode=block" always;
    #add_header X-Content-Type-Options "nosniff" always;
    #spdy_headers_comp 5;
    ssl_buffer_size 1369;
    ssl_session_tickets on;

    # enable ocsp stapling
    resolver 8.8.8.8 8.8.4.4 valid=10m;
    resolver_timeout 10s;
    ssl_stapling on;
    ssl_stapling_verify on;

    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;

    # limit_conn limit_per_ip 16;
    # ssi on;

    location = /favicon.ico {
    log_not_found off;
    access_log off;
    }
    location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
    }
    # This matters if you use drush
    location = /backup {
    deny all;
    }
    # Very rarely should these ever be accessed outside of your lan
    location ~* \.(txt|log)$ {
    allow 192.168.0.0/16;
    deny all;
    }
    location ~ \..*/.*\.php$ {
    return 403;
    }
    location / {
    # This is cool because no php is touched for static content
    try_files $uri @rewrite;
    }
    location @rewrite {
    # Some modules enforce no slash (/) at the end of the URL
    # Else this rewrite block wouldn't be needed (GlobalRedirect)
    rewrite ^/(.*)$ /index.php?q=$1;
    }

    location @rewrite {
    # Drupal in a subdirectory
    rewrite ^/([^/]*)/(.*)(/?)$ /$1/index.php?q=$2&$args;
    }
    location ~ \.php$ {
    error_page 418 = @rewrite;
    recursive_error_pages on;
    fastcgi_split_path_info ^[^=](.+\.php)(/.+)$;
    include fastcgi_params;
    if ( $uri = /index.php ) {
    # not sure this conditional works, will have to check the debug logs
    break;
    }
    if ( !-e $document_root$fastcgi_script_name) {
    return 418;
    }
    #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    #fastcgi_intercept_errors on;
    #fastcgi_read_timeout 240;
    fastcgi_pass 127.0.0.1:9000;
    }
    # Fighting with ImageCache? This little gem is amazing.
    location ~ ^/sites/.*/files/imagecache/ {
    try_files $uri @rewrite;
    }
    # Catch image styles for D7 too.
    location ~ ^/sites/.*/files/styles/ {
    try_files $uri @rewrite;
    }
    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires max;
    log_not_found off;
    }
    }
     
    • Informative Informative x 1
  7. eva2000

    eva2000 Administrator Staff Member

    30,634
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,308
    Local Time:
    1:54 PM
    Nginx 1.13.x
    MariaDB 5.5