The first set of configuration will be to enable some modules and an include which I’ve listed out below, to enable them simply remove the # symbol from the beginning of the line: There will be multiple areas you need to change in this file but I’ll break it down into small chunks detailing what each part does. Now you have a backup you can go in and edit the file, I’ll be using the vim tool in my examples: vim /etc/apache2/nf Before you do though make a quick backup just in case you make an error you can always revert to the original: cp /etc/apache2/nf /etc/apache2/ To do this you need to open up the /etc/apache2/nf file in your favorite text editor. Now you have tested the server is working you need to configure it. Note: Throughout the rest of this article whenever you see the string your_username being used please change it to match the username on your Mac. Simply add 127.0.0.1 localhost on a new line and save. ![]() If your struggling to reach your site via this url you might need to add an alias in your /private/etc/hosts file, even though it should be there by default. To keep things simple I’ve listed out all the files you’ll need: /private/etc/hostsĪs Apache is already installed you can start getting familiar with its commands straight away by opening up the command prompt and entering the following.Īfter starting Apache you can test to see if the server is working in the browser by going to you should see the text “It works!”. ![]() This article is for experienced developers who have experience using the command prompt. ![]() When using third party programs you depend on it to have the latest versions of the development stack, but it can become out of date. By not using third party software you have full control over your setup, today I’ll be giving you a deep dive on how to setup your environment with the ability to have multiple PHP versions and virtual hosts. Note: This method is experimental only, when you upgrade the OS X you may loose your settings. It does however have it’s downfalls and with OS X 10.11 now coming bundled with Apache what better time to try a new setup. There are multiple methods and tools for developing web applications locally, I’ve always been a big fan of MAMP Pro due to it’s simplicity and it’s UI, it’s pleasant to use, very easy to setup and you’ll get running in no time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |