To get your localhost up and running, install the lamp-server packages.
Open up a terminal and type in:
Scroll down to Tasks, press Enter
-> Unrecognised Tasks, press Enter
-> -> lamp-server, press +
Then press g a few times to confirm the selection (enter your password), then g again to begin the installation.
Once it has finished, press q to quit aptitude, and type in the following into a web browser:
In your browser, and you should get a page saying:
Next, to setup PHP, run the following:
Code:
sudo a2enmod php5
sudo /etc/init.d/apache2 restart
Now, for anything else you wish to test, just drag and drop all files you write into the /var/www folder, then type in their names into the firefox web browser:
Code:
http://localhost/hello.php
Though, since you'll probably be wanting to keep your web server private to only you, I recommend that you setup your firewall:
Code:
sudo ufw default deny
sudo ufw enable
And all incoming connections without the ACK bit turned on will be denied (So you can connect to the outside world, but they can't freely connect to you without your permission first).
For an easy to setup GUI frontend for ufw, check out gufw.
Regards
Iain
Bookmarks