I want to use .htaccess in AWS Lightsail.

I wanted to use .htaccess in Lightsail, so I made a note of it.

To enable htaccess, you need to modify the following file.

/opt/bitnami/apps/wordpress/conf/httpd-app.conf

<Directory "/opt/bitnami/apps/wordpress/htdocs">
    Options +MultiViews +FollowSymLinks
    # AllowOverride None ←disable THIS
    AllowOverride All ←Add this
    <IfVersion < 2.3 >
        Order allow,deny

After fixing the above, restart apache.

$ sudo /opt/bitnami/ctlscript.sh restart apache

The reason I wanted to use this was because I added the Bogo plugin to build a multilingual site with WordPress, but the URL of the multilingualized site was https://xxxx.xx/, while I wanted the language name to be a subdirectory, like https://xxxx.xx/en/123 The reason for this is that the URL of the multilingualized site is now like ?lang=en, when I wanted it to be like with the language name as a subdirectory.



For this reason, after enabling the use of .htaccess in the above steps, make the .htaccess file writable with the following command, and then run

chmod 666 /apps/wordpress/htdocs/.htaccess

I made this possible by setting [Settings]-[Permalinks] in the WordPress admin panel as follows.

/%year%/%monthnum%/%day%/%post_id%

After the above settings, change the permissions back to the following.

chmod 644 /apps/wordpress/htdocs/.htaccess

The Milky Way near Sagittarius

This photos was taken on an expedition to Tarama Island in Okinawa.
I stayed there for almost a week, and it was clear every night with the best conditions. I’ve been into astrophotography since I was a kid, and this was one of the three best skies I’ve seen in my life.
It’s a small island with only about 1,000 inhabitants and there are no significant tourist facilities, so it is an island where time flows slowly and quietly.
But it has the best sea and sky.

Continue reading “The Milky Way near Sagittarius”