Top Nav

Getting the CA Certificate Chain

Most SSL providers don’t include a complete CA certificate chain with their SSL certificate and it can be hard to track down the correct chain. There’s a great website for this purpose. Check out https://whatsmychaincert.com/ … just paste in the certificate and download the correct cert chain. I’ve used hundreds of times on many different SSL providers and it’s worked every time.

0

AccessControlAllowOrigin CORS Header With Multiple Domains

The AccessControlAllowOrigin CORS header does not allow multiple domains. This can be a problem in some cases. A workaround on the server is to detect the incoming Origin header, match against an allowed list and then generate the AccessControlAllowOrigin header using the domain. In Apache this can be accomplished with:

 

 

0

AWS Resize Partition

After expanding the size of an EBS volume on an AWS EC2 instance, you’ll need to expand the partition and the filesystem. Here are the steps:

  1. Confirm available storage with “lsblk” command.
  2. Expand the partition with “growpart” command like “growpart /dev/xvdi 1”. Of course you’ll need to change the device name to match your system. The partition number on the end will be “1” if there is only one partition on the device or can be changed to select a different partition. “growpart” is in the “cloud-guest-utils” package if it’s now already installed.
  3. Confirm new partition size with “lsblk” command.
  4. If using LVM then expand the physical and logical volumes:
    1. Reread partitions with “partprobe”
    2. Resize physical volume with “pvresize /dev/xvdi1”
    3. Expand logical volume with “lvextend -l +100%FREE /dev/vg_data2/lv_data2”
  5. Resize the filesystem to fill the expanded partition. Command will depend on the filesystem type:
    • ext2/3/4 – “resize2fs /dev/xvdi1”
    • xfs – “xfs_growfs /dev/vg_data2/lv_data2”

Now you should have the expanded storage available for use.

Here’s the man pages for these commands:

https://www.systutorials.com/docs/linux/man/8-lsblk/

https://www.systutorials.com/docs/linux/man/1-growpart/

https://linux.die.net/man/8/resize2fs

https://linux.die.net/man/8/partprobe

https://www.systutorials.com/docs/linux/man/8-pvresize/

https://www.systutorials.com/docs/linux/man/8-lvextend/

https://www.systutorials.com/docs/linux/man/8-xfs_growfs/

 

0