Adding a Virtual Host to Apache

Preamble The beauty of hosting your own web server and having root access to your machine is the ability to run whatever you want on it. One great example of this is running virtual hosts in apache, which allows you to run multiple websites on the same server. What you can run as a virtual host is fairly unlimited so long as the clients can resolve the address to your web server, be it URL, IP address or even special use domain names if you so desire (though the last one I do not recommend). When setting up Virtual Hosts… Continue reading Adding a Virtual Host to Apache

Raspberry Pi – PHP permission File Problems Solved!

I recently installed php, but when I was unable to save files, I was very stuck, and that’s why I’m posting it here, I want to tell anyone who Googles this problem to find this solution. The problem was when I used an fopen and fsave within php, the file would always ‘die’ as in the open or die within php. The solution is below Firstly I looked for the Environment user in phpinfo() in my case it was www-data and then I simply typed this chmod 777 -R www-data /var/www that, in its simplicity is the solution, but I am… Continue reading Raspberry Pi – PHP permission File Problems Solved!

How to Configure Apache to use Virtual Hosts

Using Apache is Good, but for one website is limiting its potential you can create multiple websites, domains and sub-domains with Apache, see below.     First you need to stop your server, you can do this on lunix by entering [box type=”shadow”] $ sudo /etc/init.d/apache2 stop [/box] into your terminal, this allows you to make changes to files in your server without breaking it, for windows you need to stop Apache using Xammp, see below.                                 Now Enable Mod_log_config browse here [box type=”shadow”]xamppapacheconf[/box] and in… Continue reading How to Configure Apache to use Virtual Hosts