.

How to Install Web Server on Debian or Ubuntu Server

Saturday, January 8, 2011

If you want to create web server on linux debian or ubuntu, I recomended you to use apache2. What is apache2? Apache2 is web server based linux or windows. So you can install apache2 on linux or windows, just download supported operating system.

Ok, let's begin. Now, I use linux debian console. You can use ubuntu or linux debian desktop server too.

1. Open terminal (on linux desktop, if you use linux desktop. If no, just skip this step).
2. Type :

apt-get install apache2 php5 links
3. On screen, press enter or Y and enter. Wait all proccess done.
4. Done, you have web server based apache2 and php5.

Now, setting apache.
1. Type :
a2enmod userdir
2. Copy file 000-default in apache to mainsite :
cp /etc/apache2/sites-enabled/000-default /etc/apache2/sites-enabled/mainsite
3. Setting mainsite file for apache :
nano /etc/apache2/sites-enabled/mainsite
Then, edit settings or delete some line if not to use.  I use this setting :
NameVirtualHost 200.100.50.25:80

ServerName www.arul.co.id
DocumentRoot /home/arul/public_html
4. Save it with press CTRL + X , then yes and enter.
5. Create directory public_html
mkdir /home/arul/public_html
6. Restart apache :
/etc/init.d/apache2 restart
7. Test your settings :
links www.arul.co.id
8. If you see your site, it's success.

0 comments: