일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- non-www
- https
- root
- SSL
- crontab
- 구글 클라우드
- Fail2ban
- CentOS7
- LetsEncrypt
- Mac
- php
- child theme
- Google Cloud
- new user
- MariaDB
- Linux
- Certbot
- home page
- DOM Parser
- git pull
- Liniux
- html
- Xdebug
- vscode
- launch.json
- wordpress
- centos
- front page
- Apache
- mysql
- Today
- Total
목록All (35)
between 0 and 1
- general configuration file is located under /etc/logrotate.conf - specific changes are under /etc/logrotate.d By default the logrotate job is started once a day by OS cron.daily job (/etc/cron.daily/logrotate) database user for log rotation CREATE USER 'logrotate'@'localhost' IDENTIFIED BY 'secret'; GRANT RELOAD ON *.* to 'logrotate'@'localhost'; database user information (mysql or mariadb) # ..
Step 1. move to "Settings -> Reading" Step 2. select "A static page" Step 3. select a homepage or posts page Step 4. "Save Changes"
function.php if ( ! function_exists('child_theme_enqueue_scripts') ) { function child_theme_enqueue_scripts() { $parent_style = 'parent-theme'; wp_enqueue_style('child-theme', get_stylesheet_directory_uri() . '/style.css', array($parent_style)); } add_action('wp_enqueue_scripts', 'child_theme_enqueue_scripts'); } style.css /* Theme Name: child-theme Description: A child theme of Parent Theme Aut..
Fail2ban is an open-source software that actively scans the servers log files in real-time for any brute force login attempts, and if found, summarily blocks the attack using the servers firewall software (firewalld or iptables). Fail2Ban runs as a background process and continuously scans the log files for unusual login patterns and security breach attempts. Installation $ yum install epel-rele..
mysql> GRANT ALL PRIVILEGES ON *.* TO myuser@localhost WITH GRANT OPTION; or mysql> GRANT ALL PRIVILEGES ON *.* TO myuser@localhost IDENTIFIED BY 'password' WITH GRANT OPTION; to make super(root) user, "WITH GRANT OPTION" should be applied.
Step 1. Create Database mysql> create database new_database; Step 2. Restore MySQL Dump $ mysql -u [user] -p [new_database] < [filename].sql make sure to include [new_database] and [filename] in the path.
for internal access (localhost) CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; FLUSH PRIVILEGES; for remote access CREATE USER 'newuser'@'%' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'%'; FLUSH PRIVILEGES;
Step 1. create ssl certificate $ letsencrypt Step 2. create .htaccess file on webroot and save below contents. RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{ENV:HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301,NE] Step 3. set vhost.conf ServerName example.com ServerAlias ww..
To renew ssl automatically, We can use crontab. Step 1. enter crontab edit mode $ sudo crontab -e Step 2. certbot auto-renewal script ## certbot 30 4 * * 0 certbot renew >> /home/log/certbot/cert_$(date +\%Y\%m\%d).log above script will be executed 4:30 AM on every Sunday. and the execution log will be stored in the "/home/log/certbot/" folder.
Prerequisites - CentOS - Apache Web Server on CentOS Step 1 - Installing the Crertbot Let's Encrypt Client $ sudo yum install epel-release $ sudo yum install certbot python2-certbot-apache mod_ssl -y Step 2 - Obtaining a Certificate $ sudo letsencrypt Step 3 - set information and select domain for ssl 1) set email address Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected:..