Linux mv rename a file without retyping the whole filename or path (append a suffix)

https://stackoverflow.com/questions/208181/how-to-rename-with-prefix-suffix

Use Brace Expansion, e.g.

mv /var/log/apache2/modsec_audit.log{,.old}

That will move/rename modsec_audit.log to modsec_audit.log.old. Even in the same directory, this is useful.

Advertisements

Raspberry Pi force resolution when no HDMI display is connected

https://raspberrypi.stackexchange.com/questions/8985/forcing-resolution-on-display-0-when-hdmi-is-not-connected

https://www.raspberrypi.org/documentation/configuration/config-txt/README.md

Edit /boot/config.txt

***set group 2 & mode 16 for 1024×768. Group 1 is television/HDTV resolutions (480p, 720p, 1080p etc), and Group 2 is for computer monitor resolutions.

Set or uncomment, the following lines, in /boot/config.txt

hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=16 # (or any other pi resolution you want, 16 is for 1080p)

Install FreePBX manually on Debian / 500 Internal Server Error after installation

https://wiki.freepbx.org/display/FOP/Installing+FreePBX+14+on+Debian+8.8

As of today, the current version is 8.11, but it will still work.

After running all the commands, create a service so that FreePBX will start when the system boots:

https://wiki.freepbx.org/display/HTGS/Example+systemd+startup+script+for+FreePBX

When I first loaded the admin page in my browser, Apache was showing error 500. After checking the error log with cat /var/log/apache2/error.log:

[Sun Dec 02 15:41:24.359263 2018] [core:alert] [pid 1156] [client 173.3.99.10:54345] /var/www/html/admin/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration

…I found that the Apache rewrite module wasn’t enabled by default.

To fix this, run a2enmod rewrite && service apache2 restart and try again. That did the trick for me.

Create a free website or blog at WordPress.com.

Up ↑