Your SlideShare is downloading. ×
Setting Up VirtualHost in Apache (Debian-based OS)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Setting Up VirtualHost in Apache (Debian-based OS)

587

Published on

A simple guide in creating a virtual host in debian-based systems.

A simple guide in creating a virtual host in debian-based systems.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
587
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Setting Up VirtualHost in Apache(Debian-based OS)Gerald Z. VillorenteKite Systems Inc.
  • 2. Installation$ sudo apt-get install apache2- the APT will automatically select one of the four engines● apache2-mpm-prefork● apache2-mpm-worker● apache2-mpm-event (not recommended)● apache2-mpm-itk (not recommended)
  • 3. Enabling needed modules$ sudo a2enmod rewrite$ sudo a2enmod vhost_alias
  • 4. Creating Vhost$ sudo (gedit | geany | vim) /etc/apache2/sites-available/myproject<VirtualHost *:80>ServerName dev.myproject.comDocumentRoot /home/gerald/www/myproject</VirtualHost>
  • 5. Adding ServerName in Hosts file$ sudo (gedit | geany | vim) /etc/hosts127.0.0.1 dev.myproject.com# Where “dev.myproject.com” is the value of ServeName in the vhost file you createdor192.168.100.15 dev.myproject.com
  • 6. Activating Vhost config file$ sudo a2ensite myproject# Where “myproject” is the filename of the file you created in /etc/apaches/sites-available$ sudo /etc/init.d/apache2 restartLets test it! (While in terminal)$ firefox http://dev.myproject.comor$ chrome http://dev.myproject.com
  • 7. Questions?

×