• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Archives for October 2018

Force Rewrite To HTTPS Except For Page

October 31, 2018

Here’s how to force a rewrite pages to https except for a couple of pages.

RewriteEngine On
 
RewriteCond %{HTTPS} =off
RewriteCond %{REQUEST_URI} !^\/page1\/
RewriteCond %{REQUEST_URI} !^\/page2\/
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L,R=301]    
 
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} \/page1\/ [OR]
RewriteCond %{REQUEST_URI} \/page2\/
RewriteRule (.*) http://%{HTTP_HOST}/$1 [L,R=301]

RewriteEngine On RewriteCond %{HTTPS} =off RewriteCond %{REQUEST_URI} !^\/page1\/ RewriteCond %{REQUEST_URI} !^\/page2\/ RewriteRule (.*) https://%{HTTP_HOST}/$1 [L,R=301] RewriteCond %{HTTPS} =on RewriteCond %{REQUEST_URI} \/page1\/ [OR] RewriteCond %{REQUEST_URI} \/page2\/ RewriteRule (.*) http://%{HTTP_HOST}/$1 [L,R=301]

The first rule-set will redirect all pages not /page1/ or /page2/ to the same URL but https://.
The second rule will make sure that /page1/ and /page2/ are redirected back to http:// if accessed via https://.

Here’s the Stackdriver source.

Filed Under: Linux Tagged With: force https, http

SSL Expiry

October 30, 2018

It’s not always clear how to find out when your SSL certificate is expiring. Openssl should be able to tell you.

$ openssl x509 -enddate -noout -in certificate.crt

$ openssl x509 -enddate -noout -in certificate.crt

Filed Under: Linux Tagged With: certificate, expiry, openssl

IBM Buys Redhat

October 28, 2018

Fresh news from today. IBM buys Redhat for $34 billion.

Here’s the latest news.

Filed Under: Linux Tagged With: ibm, red hat

Working with SSMTP

October 28, 2018

Sometimes you just want something simple. There’s no need to configure sendmail every time you build a box.

Instead, you can install and use ssmtp coupled with a Gmail account.

Filed Under: Linux Tagged With: gmail, ssmtp

LVM Documentation

October 17, 2018

If you’re working with LVM, here’s everything you need to know about Logical Volume Manager. Thanks to Centos.

LVM Documentation.

Filed Under: Cloud, Linux Tagged With: documentation, lvm

GSUtil Installation

October 15, 2018

The standard GSUtil installation recommended by Google wasn’t working. I found an alternative way to install GSUtil using wget to download, and tar to unzip. You might need to add a path if you install it on a non-standard directory.

Alternative way to install GSUtil on Linux.

Filed Under: Cloud Tagged With: gcp, gsutil

Testing a Network Port Connection

October 10, 2018

You can test a network port connection using the “nc” command on Linux and “telnet” on Windows.

Format:
$ nc -zv domain.com port
C:\> telnet domain.com port

$ nc -zv domain.com 80
Connection to domain.com 80 port [tcp/http] succeeded!

$ nc -zv domain.com 80 Connection to domain.com 80 port [tcp/http] succeeded!

C:\> telnet -zv domain.com 80
Connecting To domain.com...Could not open connection to the host, on port 80: Connect failed

C:\> telnet -zv domain.com 80 Connecting To domain.com...Could not open connection to the host, on port 80: Connect failed

For Telnet, if a connection is successful, it returns no message.

Filed Under: Cloud, Linux Tagged With: connection, nc, port, telnet, test

Limitations when Stopping RDS

October 10, 2018

There are several cases where there will be a need to stop a RDS instance. It could be due to testing, development activity, or simply to save money. Whatever the reasons may be, you’ll need to be aware of the limitations when stopping RDS instances. Here are several cases where it may become an issue.

  • You can’t stop a DB instance that has a Read Replica, or that is a Read Replica.
  • You can’t stop a DB instance that is in a Multi-AZ deployment.
  • You can’t stop a DB instance that uses Microsoft SQL Server Mirroring.
  • You can’t modify a stopped DB instance.
  • You can’t delete an option group that is associated with a stopped DB instance.
  • You can’t delete a DB parameter group that is associated with a stopped DB instance.

Filed Under: Cloud Tagged With: rds, stopping

  • Go to page 1
  • Go to page 2
  • Go to Next Page »
  • Home
  • About
  • Archives

Copyright © 2023