From f9c0aacaec46c58daabd88c7fcbcd57cedaa33d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= Date: Mon, 6 May 2019 13:39:57 -0700 Subject: [PATCH] Add README.md --- README.md | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..925b718 --- /dev/null +++ b/README.md @@ -0,0 +1,121 @@ +# Vagrant File + +Vagrant File with box.scotch.io + +## Getting Started + +If you use Vagrant, this box can help you a lot. +https://box.scotch.io + +With this Vagrantfile, you can easily use and implement many web apps with a self-certificate signed. + +### Prerequisites + +* virtualbox - https://www.virtualbox.org; +* Vagrant - https://www.vagrantup.com; + +### Installing + +Install virtualbox and Vagrant. + +After that, go the main project folder and save this file and run the following command: + +``` +vagrant up +``` + +This command will mount all the environment to you. + + +## Create a self-signed certificate + +Run the command: + +``` +vagrant ssh +``` + +and run the following commands to create a self-signed certificate: + +``` +sudo a2enmod ssl +sudo service apache2 restart +sudo mkdir /etc/apache2/ssl +sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt +sudo a2ensite default-ssl.conf +``` + +Create or move the file scotchbox.local.conf: +``` +sudo nano /etc/apache2/sites-available/scotchbox.local.conf +``` + +``` + + ServerAdmin webmaster@localhost + ServerName scotchbox.local + ServerAlias www.scotchbox.local + DocumentRoot /var/www/public + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + SSLEngine on + SSLCertificateFile /etc/apache2/ssl/apache.crt + SSLCertificateKeyFile /etc/apache2/ssl/apache.key + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + BrowserMatch "MSIE [2-6]" \ + +nokeepalive ssl-unclean-shutdown \ +downgrade-1.0 force-response-1.0 +BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown +``` + +## Edit Vagrant file for your project + +Open your Vagrant file and change the line for your project name: + +``` +VagrantDomain=("app1.dev" "app2.dev" "appN.dev") +``` + +Edit your hosts, typically sudo nano /etc/hosts - and set: +192.168.33.10 www.app1.dev + +After run the command: + +``` +vagrant provision +``` + + +and visit your app in your browser: + +https://www.app1.dev + + +## Built With + +* [virtualbox](https://www.virtualbox.org) +* [Vagrant](https://www.vagrantup.com) +* [scothcbox](https://box.scotchbox.io) - Box with many software installed + +## Contributing + +Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us. + +## Versioning + +We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). + +## Authors + +* **André Almeida** - [andrealmeida.net](https://andrealmeida.net) + +## License + +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details +