Blog

Joomla! is a free and open-source content management system (CMS) for publishing web content. It is built on a model–view–controller web application framework that can be used independently of the CMS that allows you to build powerful online applications.

 

After installing Joomla you may notice your links have index.php within the url.


While functional, for Search Engine Friendly URLs, it is recommend to remove script names

 

To remove index.php from urls, login to the Joomla administration section

https://www.yourjoomlasite.com/administrator/

 

Select System

Select Global Configuration

 

Search Friendly URLs should already be enabled

Enable Use URL Rewriting

 

URL rewriting is a way of implementing URL mapping or routing within a web application. Rewritten URLs (sometimes known as short, pretty or fancy URLs, search engine friendly - SEF URLs, or slugs) are used to provide shorter and more relevant-looking links to web pages. The technique adds a layer of abstraction between the files used to generate a web page and the URL that is presented to the outside world.

Rewrite Engine

 

Click Save

 

View your blog post again,

It may work, but most likely you will get a 404

 

You now need to tell the web server what to URL Rewrite

 

If you are using Apache as your web server, conveniently, Joomla comes with rules already written, you just need to enable them.

 

In the Joomla web directory, there should be a file named htaccess.txt

Rename that file to .htaccess

 

mv htaccess.txt .htaccess


In Linux, 

mv moves a file to another file, thus renaming it.

ls -l shows detailed listing of fies

ls -al also show 'hidden' files starting with a dot

 

And now you should have Search Friendly URLs without the index.php in the url.

 

Here are the contents of Joomla’s .htacccess file, in case it is not in your web directory

 

$ cat .htaccess

##

# @package    Joomla

# @copyright  Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.

# @license    GNU General Public License version 2 or later; see LICENSE.txt

##


##

# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!

#

# The line 'Options +FollowSymLinks' may cause problems with some server configurations.

# It is required for the use of mod_rewrite, but it may have already been set by your

# server administrator in a way that disallows changing it in this .htaccess file.

# If using it causes your site to produce an error, comment it out (add # to the

# beginning of the line), reload your site in your browser and test your sef urls. If

# they work, then it has been set by your server administrator and you do not need to

# set it here.

##


## No directory listings

<IfModule autoindex>

  IndexIgnore *

</IfModule>


## Can be commented out if causes errors, see notes above.

Options +FollowSymlinks

Options -Indexes


## Mod_rewrite in use.


RewriteEngine On


## Begin - Rewrite rules to block out some common exploits.

# If you experience problems on your site then comment out the operations listed

# below by adding a # to the beginning of the line.

# This attempts to block the most common type of exploit `attempts` on Joomla!

#

# Block any script trying to base64_encode data within the URL.

RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]

# Block any script that includes a <script> tag in URL.

RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]

# Block any script trying to set a PHP GLOBALS variable via URL.

RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]

# Block any script trying to modify a _REQUEST variable via URL.

RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})

# Return 403 Forbidden header and show the content of the root home page

RewriteRule .* index.php [F]

#

## End - Rewrite rules to block out some common exploits.


## Begin - Custom redirects

#

# If you need to redirect some pages, or set a canonical non-www to

# www redirect (or vice versa), place that code here. Ensure those

# redirects use the correct RewriteRule syntax and the [R=301,L] flags.

#

## End - Custom redirects


##

# Uncomment the following line if your webserver's URL

# is not directly related to physical file paths.

# Update Your Joomla! Directory (just / for root).

##


# RewriteBase /


## Begin - Joomla! core SEF Section.

#

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

#

# If the requested path and file is not /index.php and the request

# has not already been internally rewritten to the index.php script

RewriteCond %{REQUEST_URI} !^/index\.php

# and the requested path and file doesn't directly match a physical file

RewriteCond %{REQUEST_FILENAME} !-f

# and the requested path and file doesn't directly match a physical folder

RewriteCond %{REQUEST_FILENAME} !-d

# internally rewrite the request to the index.php script

RewriteRule .* index.php [L]

#

## End - Joomla! core SEF Section.

 

 

If you are using Nginx for your web server, instead of using the .htaccess file, you will need to edit your Nginx configuration

 

Add the next code to your server (vhost) configuration in the nginx.conf file:

 

# Support Clean (aka Search Engine Friendly) URLs

location / {

    try_files $uri $uri/ /index.php?$args;

}

 

If the above does not work, add the next code to your server configuration in the nginx.conf file

server {

    ....

    location / {

        expires 1d;


        # Enable joomla SEF URL's inside Nginx

        try_files $uri $uri/ /index.php?$args;

    }

    ....

}

Joomla Docs - Enabling Search Engine Friendly (SEF) URLs on Nginx

 

 

End of document. Thanks for reading.

Node.js is a JavaScript runtime which uses an event-driven, non-blocking I/O model.

 

Node.js can be an alternative to Java, PHP, .Net, Python, etc to develop web sites and applications using best convention frameworks such as Express.js, desktop applications using Electron.js, mobile apps using Ionic.js or React Native, to name a few of the possibilities.

 

Node.js is often referenced as just Node, but for easier internet searching, it is best to stick with nodejs.

 

Note: Node.js can be installed on multiple platforms, but if you are going to use Node.js to develop mobile apps and you want to be able to use an hardware emulator to test your development, you will need to install Node.js in your Host computer, and not a Guest VM.


To install Node.js in Windows 10
Go to https://nodejs.org

 

 

You can either download the LTS (long term support) version or the current version. Normally you would think to grab the latest, but for Node.js, it is better to use the LTS version.

Click the LTS button and download Node.js.

If you click on the LTS schedule, you will see how long Node.js intends to support both versions.

 

 

As you can see, the Current version will no be supported for as long. Node.js is following the pattern of even releases are for production while odd releases are for development. Also, some Node.js frameworks, such as Ionic.js, do not work well with the Current version, due to library dependencies. It is best to use the LTS version unless you find a particular need for the Current.

Double click the Node.js version you downloaded (node-v8.9.3-x64.msi) to begin installation.

Click Next

 

 

The normal agree to everything which you will never read but it is required to install any software.

Click Next

 

 

Choose a installation directory

The default is C:\Program Files\nodejs

 

 

For development, it can be better to keep your tools under a common directory, such as C:\Dev\. Doing so facilitates backups, deletions, you will have less typing to get to a directory, etc

 

Click Change and select your installation location

Click Next

 

 

By default all the options are enabled, leave them so.

  • npm is a package manager for Node.js and other software; it is the common method of installing Node.js related frameworks and libraries.
  • Add to Path is import as you will need to use the command line at times with Node.js

Click Next

 

 

Actually start the installation

Click install

 

 

And your done installing.

Click Finish

 

 

To verify that Node.js was installed, open a command prompt

Start -> Run -> type cmd and press enter

 

Instead of the Windows command prompt, you may want to use ConsoleZ which gives you more developer friendly options, such as easier copy/paste, tabs, etc

 

Change the directory to where you installed Node.js

cd C:\Program Files\nodejs

or

cd C:\Dev\nodejs

 

Verify the version of Node.js

node -v

The output should be the same you installed

 

You can also check the version of npm

npm -v

To update npm and other Node.js libraries you will install,

npm update

 

There will probably be an update to npm at least

 

 

You now have Node.js installed.

Your on your way to developing with frameworks such as Express.js, desktop applications using Electron.js, mobile apps using Ionic.js or React Native, to name a few of the possibilities.

 

 

End of document. Thanks for reading.

To enable the full functionality of VirtualBox, you often have to install Guest Additions, which enable features such as shared drives and better video support, such as being able to auto size the Guest VM display to the current dimensions of the VirtualBox gui, or to view the Guest VM in full screen.

 

“Guest Additions are designed to be installed inside a virtual machine after the guest operating system has been installed. They consist of device drivers and system applications that optimize the guest operating system for better performance and usability.”

VirtualBox Manual

 

When you upgrade the OS within a Guest VM, it’s kernel may change requiring you to re-install Guest Additions. You will know the Guest Additions need to be re-installed when basic features such as viewing the Guest VM in full screen no longer work.

 

To install VirtualBox you can follow this guide How to Install VirtualBox

To install a Ubuntu VM you can follow this guide How to Install a Ubuntu Virtual Machine

 

To re-install VirtualBox Guest Additions

Click Devices and choose Insert Guest Additions CD Image

 

Most likely you will be able to Run the Guest Additions and then reboot and be back to a fully functional VirtualBox Guest VM.

But, sometimes the Guest Additions CD does not run ie does not mount

 

Some possible solutions are:

 

• Simply reboot to ensure the current OS upgrade has been applied

  The try to re-install the Guest Additions again.

  If that works, your done!

• If not, try to manually mount the Guest Additions CD

  From a terminal window (right click on Ubuntu desktop -> Terminal)

  sudo mkdir --p /media/cdrom
  sudo mount -t auto /dev/cdrom /media/cdrom/

  ls -l /media/cdrom/
  sudo sh VBoxLinuxAdditions.run

  If that works, your done!

 

  To check the device location of the CD ie /dev/cdrom,

     vi /var/log/kernel.log

  Look for CD (type forward slash CD and press enter ie /CD)

  You should see a reference to /dev/cdrom or /dev/sr0

  More details at askubuntu unable-to-mount-virtualbox-guest-additions

 

• If when you run mount you receive an error

  sudo mount -t auto /dev/cdrom /media/cdrom/
  mount: unknown filesystem type 'iso9660'

  This means a basic kernel module was not loaded,

  so re-install the kernel and reboot.

  sudo apt-get install --reinstall linux-image-$(uname -r)

  (uname -r)

  Displays the kernel version, making the --reinstall command above generic

  4.10.0-42-generic

 

After rebooting you may notice that the Guest VM resizes and runs as full screen, as expected.

It is still a good idea to re-install the Guest Addition CD at this point to ensure the kernel has been updated with VirutalBox additions.

 

To re-install VirtualBox Guest Additions

Click Devices and choose Insert Guest Additions CD Image

Then choose Run

 

The Guest Additions may prompt you to confirm that you are re-installing

Type yes and press enter

Press enter to close the window

And once more reboot

 

You should have a fully functional VirtualBox again.

If you are still having issues, check the askubuntu links for more ideas

unable-to-install-guest-additions-unknown-filesystem-type-iso9660

unable-to-mount-virtualbox-guest-additions

Within VirtualBox, you can enable shared drives to facilitate the transfer of files between the Guest VM and the Host computer.


To install VirtualBox you can follow this guide How to Install VirtualBox

To install a Ubuntu VM you can follow this guide How to Install a Ubuntu Virtual Machine.


To enable Shared Folder between the VirtualBox Host and Guest VM:

Form VirtualBox, select your VM and click Settings


Select Shared Folders, click Add a folder, and choose a local folder, such as

C:\Temp or C:\Dev\VMs\Shared


Select Auto Mount and Permanent, to facilitate usage.


Start the VM and try to access the shared drive.

With Ubuntu, and maybe other Linux versions, you will not have permission, by default.


Per the discussion on StackExchange

Open a Terminal and add your user to the vboxsf user group

sudo usermod -aG vboxsf [youruser]


You will need to reboot your VM for these changes to take effect

And copy a file into the shared folder; you should be able to access it from either the VM or the Host.