Apache Installation And Configuration Under Ubuntu/Debian
Service Used : httpd (Hyper Text Transfer Protocol Daemon)
Port used : 80
Document Root : /var/www
Configuration File : /etc/apache2/apache2.conf
# /etc/apache2/ports.conf // conf file of apache ports and ip address
# apt-get install apache2
# /etc/init.d/apache2 start
# apt-get install apache2
# /etc/init.d/apache2 start
But apache2 has configured the virtualhost by default in ubuntu,you can see in the bottom of the configuration file " Include sites-enabled "
# /etc/apache2/sites-available/default
Copy the default conf file and paste with your website name
# sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/testsite
# vim /etc/apache2/sites-available/testsite
<virtualhost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
</virtualhost>
Enable the website by# vim /etc/apache2/sites-available/testsite
<virtualhost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
</virtualhost>
# sudo a2ensite testsite
Apache Installation And Configuration Under Ubuntu/Debian
Reviewed by vivek sathisan
on
13:30
Rating:

No comments: