Home
Silva Mac OS

Silva Mac OS

May 27 2021

Silva Mac OS

We used to be a massive fan of AMPPS but since upgrading to macOS Catalina, it wasn’t possible to use this application anymore. I’m sure they will update it again in future but the issue is that it’s a 32 bit application, it’s no longer compatible on the latest OS. So that’s when we made the switch to XAMPP. It’s not as straight forward to use as AMPPS, but it’s probably one of the better applications for localhost development.

For Mac OS X 10.11 or later. I want to update Chrome This computer will no longer receive Google Chrome updates because Mac OS X 10.6 - 10.10 are no longer supported. The 'classic' Mac OS is the original Macintosh operating system that was introduced in 1984 alongside the first Macintosh and remained in primary use on Macs until the introduction of Mac OS X in 2001. Apple released the original Macintosh on January 24, 1984; its early system software was partially based on the Lisa OS and the Xerox PARC Alto computer, which former Apple CEO Steve Jobs.

Installing was a breeze, but things became a bit more complicated when setting up Apache VirtualHosts. So here are a few steps we took to get everything running as we wanted it. So firsts things first…

What is VirtualHosts?

Okay, so we’re going to explain what we wanted to change in order to get out localhost set up exactly how we wanted it…

VirtualHosts allow Apache to map a hostname to a directory on the filesystem. You can set up as many VirtualHosts as you need so that each website operates under its own hostname. For example, you might want to map yoursite.silva to /Users/myusername/yoursite. To test your development site all you would need to do is visit “http://yoursite.silva” into your browser’s address bar. By default, it would be set up as http://localhost/yoursite.

So how do we make this change?

How to Enable VirtualHosts

Firstly, you’ll need to open the following file; /Applications/XAMPP/xamppfiles/etc/httpd.conf in your preferred text editor. An easy way to get here is by going to ‘Finder’ –> ‘Go’ –> ‘Go to Folder’ and then simply pasting in the location.

Now that you have the file open, you will need to look for these lines;

Silva marco

Now, uncomment the second line by removing the hash (#) so that Apache will load your customised VirtualHosts files as follows:

Let’s create your VirtualHosts

Lets now open the following file; /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf. R academy mac os. Towards the bottom of the file you will see some example VirtualHosts, which you should comment out or delete.

At the bottom of the file, add ‘localhost’ as the default named VirtualHost like so:

What this does is allows http://localhost to point at XAMMP’s htdocs directory once we have created our VirtualHosts.

With this done, we can now create our own VirtualHosts. So, after the default localhost, we can now add:

With the example above, you should replace yoursite.silva with your own hostname, this can be pretty much anything you like. The exception is using a hostname that will not conflict with a real domain name, like yoursite.dev. We used to use yoursite.dev but since it became owned by Google we can no longer use this along with quite a few others.

Now we have another step to do to get this working fully…

Edit your hosts file

Now we need to go to the following location; /etc/hosts, we will be editing the hosts file so it knows how to handle the new server name. The hosts file is used by OS C to map hostnames to IP addresses. In our case, since we are going to be using localhosts, we want to map the server name to the IP address 127.0.0.1 (this is your localhost IP).

Pro Tip: You can actually map any website to any IP address. We tend to do this for website migrations, let’s say we moved silvawebdesigns.com to a new IP address, we could simply add 192.123.123.124 silvawebdesigns.com (add www. if your website contact this in the web address). The advantage of this is that we can test the website on the new server before updating the Nameservers or DNS, this way we can be 100% the site will work perfectly before the migration.

So now that we’ve mapped the server name to your localhost, the next step is… How to format sd card that won t mount.

Restart Apache

When updating any of these files, for the changes to take effect, we need to restart Apache. This can be done through the XAMPP Control found here: /Applications/XAMPP/XAMPP Control.app

Now, let’s point your browser to http://yoursite.silva (or whichever server name you chose) and you should see your website.

If it’s all working now, then happy days! But should you have a problem like a 403 error, then see below:

Oh no, I have a 403 error!

Since Apache runs as a ‘nobody’ user by default, it may not have the permissions required to browse your OS X user directory or it’s sub-directories. In this case scenario, you’ll receive a 403 ‘access forbidden’ error when attempting to view your site within your localhost. In other cases, you may see that you can view the site but you get a few PHP errors when attempting to write files or create directories within your filesystem.

So, in order to fix this, you can configure Apache to run as your OS X user. To do this, open the following file; /Applications/XAMPP/xamppfiles/etc/httpd.conf and look for the following lines:

Now, change User to your OS X username, and save the file:

Restart Apache again and you should now be able to navigate your site without any issues, including manipulating files and folders using PHP.

Should you have any further problems, then try setting your user read and write privileges on the following file; /Applications/XAMPP/xamppfiles/htdocs/xampp/lang.tmp

To conclude

Hopefully, now you should have your custom domain setup via localhosts on OS X. Like we have already mentioned, it’s not simple to add custom domains as it was with AMPPS, but once you’ve completed the initial setup, all you have to do is update your /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf file with your new domain by copying and amending one you added previous, then add 127.0.0.1 yournewdomain.silva to your /etc/hosts files and you’re are all set!

If you need any assistance or fall into any issues in setting this up, drop us a comment below and we’d love to help you with this!

If you need to restore an image of an old version of Mac OS X (Leopard or Snow Leopard, for example), using a newer version of macOS (Mojave or Catalina) you may encounter messages like this, due to the uselessness of the newer versions of Disk Utility.

It seems Apple keeps removing features from these previously good utilities to make us throw away our Macs just because we cannot restore a simple image!!

One day they will remove the Terminal too, and on that day I will be forced to use Linux as a desktop OS (gasp!). But not this day!

Silva Marco

Silva Mac OS

Silva Mcs

Format your USB drive

Silva Mac Os Catalina

Use asr to restore a .dmg file

Silva Masada

Let’s ditch the Disk Utility for restoring and use Terminal.

Silva Mac Os X

Open up Terminal and type this:

Silva Mac OS

Leave a Reply

Cancel reply