There are myriads of Howto's out there but this one is mine.
Fire up your firefox, at the URL, type http://localhost/ or http://127.0.0.1/ you should see some website. Good. Now configure the website.
To create your lame or state of the art web site:-
Change Apache default site to your own. Your index.html is going to be stored in /home/some_user/public_html/ (note replace some_user with user name in your system)
Fire up your terminal, call it terminal cutie
now type the following to copy the default site to mysite.
sudo cp /etc/apache2/sites-available/default \ |
Fire up another terminal, call it terminal cutier
now type the following to change the configuration, you can # or rem out the original line before changing it.
gksudo gkedit /etc/apache2/sites-available/mysite |
Change DocumentRoot to point to the new location, /home/some_user/public_html/
Change the Directory directive, replace <Directory /var/www/> to <Directory /home/some_user/public_html/>
UPDATE: oh, and take out the Indexes to disable automatic indexing of directory, that's a personal preference of me. I did that by adding # in the front to rem out the original.
#Options Indexes FollowSymLinks MultiViews |
Save the file.
Now deactivate the old site (the default) and activate the new one, mysite
From terminal cutie, type
sudo a2dissite default && sudo a2ensite mysite |
To create an index.html under /home/some_user/public_html/
From terminal cutie, type
echo '<b>Hello World!</b>' > \ |
Finally restart apache by typing at terminal cutie
sudo /etc/init.d/apache2 restart |
Now point your browser to http://localhost/ you should see Hello World! I know I did.
Original reference from here.
You are such a Techno man, I am totally ignorance
ReplyDeletewp2007
You need to know what you need to know. That's good enough. I myself don't know nothing. It's pretty much cookbook way of doing things for me.
ReplyDelete