SELECT 

    post.ID,

    post.post_title,

    post.post_date,

    post.category_name,

    post.category_slug,

    post.category_id,

    CONCAT( 'uploads','/', thumb.meta_value) as thumbnail,

    post.post_type

FROM (

    SELECT  p.ID,   

          p.post_title, 

          p.post_date,

          p.post_type,

          MAX(CASE WHEN pm.meta_key = '_thumbnail_id' then pm.meta_value ELSE NULL END) as thumbnail_id,

      term.name as category_name,

      term.slug as category_slug,

      term.term_id as category_id

    FROM wp_posts as p 

    LEFT JOIN wp_postmeta as pm ON ( pm.post_id = p.ID)

    LEFT JOIN wp_term_relationships as tr ON tr.object_id = p.ID

    LEFT JOIN wp_terms as term ON tr.term_taxonomy_id = term.term_id

    WHERE 1  AND p.post_status = 'publish'

    GROUP BY p.ID ORDER BY p.post_date DESC

  ) as post

  LEFT JOIN wp_postmeta AS thumb 

    ON thumb.meta_key = '_wp_attached_file' 

    AND thumb.post_id = post.thumbnail_id

  LIMIT 10;

first edit /etc/proftpd.conf
vi /etc/proftpd.conf
then type:
/PassivePorts and press enter to find this line:
PassivePorts 35000 35999
and press i for insert mode
replace ports with this line:
PassivePorts 30000 35000
after editing pres Esc button to exit insert mode.
then again enter:
/PassivePorts to find this line:
<Global>
PassivePorts 35000 35999
replace with this one:
<Global>
PassivePorts 30000 35000
after editing pres Esc button to exit insert mode.
then type:
:wq
and press enter for save and close the file and back to command.
now we must change TCP_IN options in /etc/csf/csf.conf file.
type:
vi /etc/csf/csf.conf
type:
/TCP_IN and then press enter to find this line:
TCP_IN = "20,21,22, etc..."
edit the line by pressing i and then add ,30000:35000 before last quotation like this:
TCP_IN = "20,21,22,...,30000:35000"
then type:
:wq
and press enter for save and close the file and back to command.
now restart related services:
csf -r restart
service lfd restart
service proftpd restart

Let's Encrypt plugin for DA

Welcome to this repository of an unofficial Let's Encrypt plugin for DirectAdmin. With this plugin it should become very easy and fast to request and automatically install and renew certificates of Let's Encrypt for your domain managed by DirectAdmin.

Development of this plugin is suspended because of native Let's Encrypt support in DirectAdmin since version 1.49.2.

Get started

However the plugin is not recommended for production use yet, we want you to offer the possibility to test this plugin. This is for development and testing propose only. If you're testing this plugin and submit an issue, please provide more debug information, so we're able to solve this issue. Run the following commands via your terminal or SSH. You must have Git AND Composer installed and working for this way to get started!

Requirements

  • DirectAdmin 1.49.2 and up (less also supported, but you won't receive a notification).
  • PHP 5.5 and up
  • Login Key (recommended)

Install

Install Composer

Skip this step if you already have Composer installed.

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer

Install Plugin

cd /usr/local/directadmin/plugins
git clone https://github.com/Petertjuh360/da-letsencrypt.git da-letsencrypt
cd ./da-letsencrypt/
chown diradmin:diradmin -hR ../da-letsencrypt/
sh ./scripts/install.sh
composer install
chown diradmin:diradmin -hR ../da-letsencrypt/

Change active=no and installed=no to active=yes and installed=yes in plugin.conf.

Update

cd /usr/local/directadmin/plugins/da-letsencrypt
git pull
composer update