Create Apache virtual host

Generate a new Apache vhost file and enable the site. Customize document root and server name.

Creates a VirtualHost configuration file to serve a specific domain from a directory. Apache reads sites-available and only activates sites that are symlinked into sites-enabled via a2ensite.

When you need this: When hosting multiple websites on one server or deploying a new application domain.

Variables

Command


        
4 views 0 copies
Log in to rate
Log in to save

Free account — save snippets into your own collections.