Skip to main content

Home/ interesting_sites/ Group items tagged host

Rss Feed Group items tagged

pagetribe .

Apache2 name-based virtual hosting on Debian/Ubuntu | Open mind - 0 views

  • Name-based - you can host multiple website on a single server or a single IP Address but proper DNS configuration is required.
  • 127.0.0.1 localhost 127.0.0.1 example.com 127.0.0.1 example.net 127.0.0.1 example.org
  • This will tell the system that example.com, example.net and example.org are not to be looked for on the internet, but on the local machine instead.
  • ...13 more annotations...
  • Create a a separate document root
  • mkdir /var/www/example.com
  • We will enable Virtual Host in your /etc/apache2/apache2.conf file. Open /etc/apache2/apache2.conf file
  • Finally, restart your Apache2 server
  • Disable the Apache2 default host configuration
  • Lets create a virtual host configuration for each site. You don't have to create from scatch actually, you can copy the default host configuration and customize it.
  • The virtual host configuration should look like this.
  • Enable your virtual host configuration
  • and add this line to the end of the file NameVirtualHost 127.0.0.1:80 NameVirtualHost 127.0.0.1:443
  • a2dissite default
    • pagetribe .
       
      The /etc/apache2/sites-available directory is not parsed by Apache2. Symbolic links in /etc/apache2/sites-enabled point to "available" sites. Use the a2ensite (Apache2 Enable Site) utility to create those symbolic links, like so: sudo a2ensite mynewsite where your site's configuration file is /etc/apache2/sites-available/mynewsite. Similarly, the a2dissite utility should be used to disable sites
    • pagetribe .
       
      The /etc/apache2/sites-available directory is not parsed by Apache2. Symbolic links in /etc/apache2/sites-enabled point to "available" sites. Use the a2ensite (Apache2 Enable Site) utility to create those symbolic links, like so: sudo a2ensite mynewsite where your site's configuration file is /etc/apache2/sites-available/mynewsite. Similarly, the a2dissite utility should be used to disable sites
  • cp /etc/apache2/site-available/default /etc/apache2/site-available/example.com
  • /etc/init.d/apache2 restart
pagetribe .

Beginners guide in Virtual Hosts on Apache - Online Training and Tutorials - 0 views

  • /etc/httpd/conf/httpd.conf).
  • httpd.conf file
1 - 4 of 4
Showing 20 items per page