2017 © Pedro Peláez
 

library avhost

image

jpuck/avhost

  • Sunday, April 1, 2018
  • by jpuck
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 18 Open issues
  • 21 Versions
  • 0 % Grown

The README.md

Apache Virtual Host Generator

Build Status Codecov Latest Stable Version Total Downloads License, (*1)

PHP 7 command line symfony console application to create Apache 2.4 virtual hosts for Ubuntu., (*2)


Getting Started

This is an Apache adminstrative tool whose commands mostly require sudo. It can write configuration files to /etc/apache2/sites-available/ invoke a2ensite as well as writing SSL certificates to /etc/ssl/certs/ and keys to /etc/ssl/private/ so the best way to install it would be somewhere in root's path., (*3)

Download the latest release, set it executable, and move it to a good path. Here's a oneline command:, (*4)

curl -s -L https://github.com/jpuck/avhost/releases/latest | egrep -o '/jpuck/avhost/releases/download/[0-9\.]*/avhost.phar' | wget --base=http://github.com/ -i - -O avhost && chmod +x avhost && sudo mv avhost /usr/local/bin/

After installing, run without any arguments to see a list of commands:, (*5)

avhost

Use the -h flag with any command to get help with usage:, (*6)

avhost <command> -h

Troubleshooting

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details., (*7)

Looking at those logs are certainly helpful, but here are a couple things that might not be obvious the first time:, (*8)

No ssl

To run an encrypted virtual host over [TLS (SSL)][21], you must have enabled [Apache Module mod_ssl][23]., (*9)

sudo a2enmod ssl

No rewrite

The default configuration with avhost is to redirect all traffic to an encrypted connection when available. This is accomplished with Apache Module mod_rewrite., (*10)

sudo a2enmod rewrite

This is recommended for many reasons. If necessary, this can be overridden by passing the option --no-require-ssl which makes sense in some cases, like when using a self-signed certificate that might cause trust issues. However, since you can get a free trusted certificate from Let's Encrypt, then there's no reason to be using a self-signed certificate on a public site anyway., (*11)

403 Forbidden

If you create the document root in some random folder, then not only must that folder and files be readable to Apache, but also every directory up to root must be executable by Apache in order for it to traverse the file system., (*12)

For example, if your site's files are in /path/to/private/web/folder, (*13)

# up to directory, folders executable
chmod go+X /
chmod go+X /path
chmod go+X /path/to
chmod go+X /path/to/private
chmod go+X /path/to/private/web

# in directory, folders executable, files readable
chmod -R go+rX /path/to/private/web/folder

No headers

In order to add protection such as X-Content-Type-Options "nosniff" and to remove the X-Powered-By information, you must enable [Apache Module mod_headers][24]. This is also needed to allow [Cross Origin Resource Sharing][25], which is not enabled by this project - you must manually define your CORS headers if you want., (*14)

sudo a2enmod headers

No compression

For performance reasons, most file types are compressed, but you must have enabled [Apache Module mod_deflate][26]., (*15)

sudo a2enmod deflate

The Versions

01/04 2018

1.0.0

1.0.0.0

  Sources   Download

29/11 2017

dev-configurable

dev-configurable

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

27/11 2017

dev-options

dev-options

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

26/11 2017

dev-gettersAndFluentSetters

dev-gettersAndFluentSetters

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

26/11 2017

dev-addSigToMeta

dev-addSigToMeta

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

26/11 2017

dev-signature

dev-signature

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

26/11 2017

dev-renderConfWithSignature

dev-renderConfWithSignature

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

23/11 2017

dev-dev

dev-dev

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

23/06 2017

dev-master

9999999-dev

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

23/06 2017

2.5.2

2.5.2.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

28/03 2017

2.5.1

2.5.1.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

24/01 2017

2.5.0

2.5.0.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

06/12 2016

2.4.0

2.4.0.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

06/12 2016

dev-h5bp

dev-h5bp

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

30/11 2016

2.3.0

2.3.0.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

30/11 2016

2.3.1

2.3.1.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

26/11 2016

2.2.0

2.2.0.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

25/11 2016

2.1.1

2.1.1.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

23/11 2016

2.1.0

2.1.0.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

23/11 2016

2.0.1

2.0.1.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett

23/11 2016

2.0.0

2.0.0.0

Create Apache 2.4 virtual hosts for Ubuntu

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jeff Puckett