Web Sharing on my Macbook

Here at Bournemouth University me and many Digital Media Design students are able to access a server that is only accessible on campus. Like me and many others, I became quickly frustrated that I could not view my .php files on my Macbook, so if I was back in the halls of residence then I was unable to view my code, live in the browser; and the only way that I could view my updated work was to upload it onto the server (on campus) until now…

To solve this diminutive problem, I decided to turn my Macbook into my own ‘virtual’ server. By doing this, the user is able to upload php files in a specific folder that can interact with databases in the browser. To do such a thing I searched the web for my problem and came across something called ‘AMP’ which is broken down into ‘Apache’, ‘MySQL’ and ‘PHP’.

To begin, ‘Apache’ is a web sharing service that is pre-installed into OS X systems running Yosemite. To activate it was simply running a few lines of code within the Terminal app. Now this may differ from different operating systems in the OS X family or others such as Windows or LINUX so in this post, we will be sticking to Apple’s way. After Apache was activated I am now able to see if  my ‘web sharing space’ in a browser work by simply typing ‘localhost’. If it works for you then it should say in html text ‘It works!’.

After Apache was successfully activated I needed to create a root directory to act as the server; this makes http://localhost/~username usable to access the directory within the web-browser. From here, I am able to click on any directories which can be found in this URL. To simply add a new directory, a folder or file must be added to a folder named as ‘Sites’ which has to be created under the directory ‘MacintoshHD/Users/yourname/Sites.

After that there was a task to turning Apaches PHP ON by uncommenting lines in a certain file located on the hard-drive.

Once that was done I needed install ‘mySQL’ which is the world’s most popular OPEN SOURCE database platform. Using this software I am able to communicate between the front end user interface (forms, drop down, keyboard input) and allow it to communicate to a database built on the technologies of mySQL. This is only possible through the communication technologies of php.

The last thing to do was to to install and configure ‘phpMyAdmin’ which is used to access and control one or many databases.

If you would like to set-up your own web sharing space on your Mac then click here for the instructions (OS X 10.10.2).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: