Summary of experience and command using centminmod
- 24-07-2022
- trienkhaiweb
- 0 Comments
If you have ever used or are using vultr,digitalocean to make Cloud Server run the web, you must have used it through system scripts, centminmod is one of them, at the time of writing this article, it seems centminmod is down trend because centos is about to be out date, but I hope soon we will see a new updated version of this extremely convenient and great performance webserver!
Mục lục
Location of Centmin Mod configuration files
Config NginX: /usr/local/nginx/conf/conf.d
Log files record accounts, passwords when creating site: /root/centminlogs
See more details below
Centmin mod shortcut (shortcut command)
- Edit php.ini = phpedi t ( /usr/local/lib/php.ini )
- Edit my.cnf = mycnf ( /etc/my.cnf )
- Edit php-fpm.conf = fpmconf ( /usr/local/etc/php-fpm.conf )
- Edit nginx.conf = nginxconf ( /usr/local/nginx/conf/nginx.conf )
- Edit (nginx) virtual.conf = vhostconf – only edits /usr/local/nginx/conf/conf.d/virtual.conf not the additional vhost domain.com.conf files added later
- Edit (nginx) php.conf = phpinc ( /usr/local/nginx/conf/php.conf )
- Edit (nginx) drop.conf = dropinc ( /usr/local/nginx/conf/drop.conf )
- Edit (nginx) staticfiles.conf = statfilesinc ( /usr/local/nginx/conf/staticfiles.conf )
- nginx stop/start/restart = ngxstop/ngxstart/ngxrestart
- php-fpm stop/start/restart = fpmstop/fpmstart/fpmrestart
- mysql stop/start/restart = mysqlstop/mysqlstart/mysqlrestart
- nginx + php-fpm stop/start/restart = npstop/npstart/nprestart
- memcached stop/start/restart = memcachedstop/memcachedstart/memcachedrestart
- csf stop/start/restart = csfstop/csfstart/csfrestart
Refer:
https://centminmod.com/command_shortcuts.html |
How to install SSL (Letsencrypt) for sites on Centmin Mod
In the beta version, by default acmetool.sh is disabled, to enable it create a file: /etc/centminmod/custom_config.inc
with the content: LETSENCRYPT_DETECT='y'
Then use acmetool.sh to install the application Letsencrypt acme.sh client and cronjob script automatically renew your Letsencrypt SSL every 60 days. With the stable version, you don't need to care about the above note. The same can be applied to other web servers (each web server has a different directory structure).
cd /usr/local/src/centminmod/addons/ ./acmeinstall |
The installation is complete,
Method 1: you can issue ssl certificate for site by following manual command lines
cd /usr/local/src/centminmod/addons./acmetool.sh issue tenmien.com lived |
In case you want to reinstall ssl
cd /usr/local/src/centminmod/addons./acmetool.sh reissue tenmien.com lived |
ssl configuration file saved at:
/usr/local/nginx/conf/ssl/tenmien.com/tenmien.com.crt.key.conf |
Method 2: After installation, use acme's selection menu:
cd /usr/local/src/centminmod/addons./acmetool.sh ./acmemenu |
Select the following options in turn from the menu:
SSL Management first). acemtool.sh install 2). acmetool.sh update 3). acmetool.sh setup 4). Issue SSL Management 5). Renew SSL Management 6). Reissue SSL Management 7). Renew All Staging /Test Certs 8). Renew ALL Live Certs 9). Renew All Live Certs HTTPS Default ten). Exit Enter option [ 1 – 10 ] -> Select option 4 |
first). Issue SSL Cert Staging/Test 2). Issue SSL Cert Staging/Test HTTPS Default 3). Issue SSL Cert Live 4). Issue SSL Cert Live HTTPS Default 5). Custom Webroot Issue SSL Cert Staging/Test 6). Custom Webroot Issue SSL Cert Staging/Test HTTPS Default 7). Custom Webroot Issue SSL Cert Live 8). Custom Webroot Issue SSL Cert Live HTTPS Default 9). S3 Issue SSL Certificate ten). S3 Issue SSL Certificate 11). S3 Issue SSL Certificate twelfth). S3 Issue SSL Certificate 13). Exit -> Select option 3 |
Advanced Customization Centmin Mod
Custom Permalinks (static paths) Add the following to the location cluster nginx configuration file:
location / {… … try_files $uri $uri/ /wordpress/index.php?q=$request_uri; } |
Refer:
https://centminmod.com/nginx_configure_wordpress.html#basicwordpress |
Install Centmin Mod Addons
Refer:
https://centminmod.com/addons.html |