Good day, gentlemen and comrades =)

Help with configuring Virtualhosts in Apache2 based on Ubuntu 12.04

My question has matured, very relevant (very strong for me)

Essence of the question:

Task:

  • Deploying on a working machine based on Ubuntu 12.04 the Lamp assembly (Apache2 + Php + MySQL)

  • Configuring 5 virtual hosts (example1x.comp, example2x.comp, example3x.comp, example4x.comp, example5x.comp) and in such a way that where .comp is the name of the machine on the local network.

  • We configure the necessary modes and configs for visibility in the working network ...


  • sudo apt-get install apache2 php php_mysgl mysgl - Roon Boh

1 answer 1

So what's the difficulty then?

  1. Install LAMP - sudo apt-get install lamp-server
  2. Go to /etc/apache2/sites-available
  3. cp default example1x.comp (correct this file so that the site parameters point to the server name you need, directory, log file)
  4. Restart Apache ( /etc/init.d/apache2 restart )
  5. Type in the browser line www.example1x.comp and check the correctness of the page load (just in case, specify 127.0.0.1 www.example1x.comp in the /etc/hosts )