Apache Configure CORS Headers for Whitelist Domains

Apache Configure CORS Headers for Whitelist Domains     In the current implementation of Cross Origin Resource Sharing (CORS) the Access-Control-Allow-Origin header can only provide a single host domain or a wildcard as the accept value. This is not optimal when you have multiple clients connecting to the same virtual server and simply want to […]

Read more
Linux: include hidden files in tar archive

When you create a tar archive of a directory tree the hidden files are normally not included. Here’s how to include the hidden files. Say you have a web directory called “/var/www/html/mysite/” that contains the following tree: .htaccess index.php logo.jpg style.css admin_dir/.htaccess admin_dir/includes.php admin_dir/index.php Normally you would use the tar command like this: tar czf […]

Read more
Reset your WordPress password via email

Reset your WordPress password via email If you’ve forgotten your WordPress admin password, you can reset it via email from the WordPress dashboard login page following these steps: Go to your WordPress login page (example.com/wp-admin) Click on Lost you password? at the bottom Enter the Username or E-mail of your WordPress admin user, then click […]

Read more
Adding SSL to Apache on EC2 with Amazon Linux

Adding SSL to Apache on EC2 with Amazon Linux   These notes assume you have Apache installed and working on EC2 with Amazon Linux, but it’s fairly similar for other versions of Linux. Install OpenSSL and the Apache Connector // for Apache 2.2 yum install openssl mod_ssl // for Apache 2.4 yum install openssl mod24_ssl […]

Read more
How to Improve rsync Performance

I need to transfer 10TB of data from one machine to another machine. Those 10TB of files are living in a large RAID which span across 7 different disks. The target machine has another large RAID which span across 12 different disks. It is not easy to copying those files locally. Therefore, I decide to […]

Read more
rsync

There are many commands to copy a directory in Linux. The difference between them in current Linux distribution are very small. All of them support link, time, ownership and sparse. I tested them to copy a Linux kernel source tree. Each command I tested twice and keep the lower result. The original directory size is […]

Read more
Migrating to Amazon Linux 2

AWS also announced that Amazon Linux 2018.03 is the last release for the current generation of Amazon Linux and will be supported until June 30, 2020. Therefore, you have to come up with a migration plan. Amazon Linux 2 comes with the same benefits as Amazon Linux, but it adds some new capabilities: long-term support: […]

Read more
mysql dump issue utf8_unicode_520_ci

i use this in linux : sed -i ‘s/utf8mb4/utf8/g’ your_file.sql sed -i ‘s/utf8_unicode_ci/utf8_general_ci/g’ your_file.sql sed -i ‘s/utf8_unicode_520_ci/utf8_general_ci/g’ your_file.sql then restore your_file.sql mysql -uyourdbuser -pyourdbpasswd yourdb < your_file.sql

Read more
Install LDAP-slapd.conf mode

Install LDAP-slapd.conf mode ——————start installation——————— Query whether to install # rpm -qa openldap-servers Remove ldap # yum remove openldap # yum remove openldap-servers Installation Environment Centos7 Apache/2.4.6 (CentOS) PHP 7.1.11 Install LDAP Server Openldap-servers-2.4.44-5.el7.x86_64 # yum install openldap-servers openldap-clients migrationtools # rpm -qa | grep openldap Delete all files in the slapd.d folder and copy […]

Read more

Hit Counter provided by dental implants orange county