Comments (5)
I second this.
from scotch-box.
If you do: "vagrant share --https 443" it will create a local tunnel on a Hashicorp HTTPS server. As for self signed SSL, it's totally possible. I have never done it though
from scotch-box.
I set it up yesterday on my dev box. Admittedly it's Windows but most of the process I followed uses openssl and Apache so is probably exactly the same:
- Generate a certificate. I'm not sure if you can do it for an IP, but you could set it up for a hostname like 'scotchbox.local' and recommend people update their hosts file to recognise that. I used this walkthrough. http://www.neilstuff.com/apache2-ssl-windows.html
- You can set up the HTTPS site in Apache as an additional VirtualHost, leaving the HTTP site unchanged, which means you could set it up for users to connect exactly as they do now but also have the option of connecting to the same site/folder over HTTPS.
- I had to add the certificate to the operating system's certificate store so that it would be trusted, and not generate a warning when accessing the site in a browser. That's for the host OS though, not the scotch box, so it would just mean linking to a tutorial for each OS, and if you don't do it you can still get to the site but you get a warning first.
So I think this would be a simple and really useful change. The only problem I can see is that it's tied to a specific hostname, so multiple scotchboxes would compete for that. But you use a single consistent IP now so it's not that different.
I'd be happy to help you work out the Apache configuration if that would be useful.
from scotch-box.
@caterwomtious Would step 2 there entail just adding a new .conf file to /etc/apache2/sites-available/?
Struggling to get SSL set up on here. Entire production site uses SSL and redirects all http to https, so seems silly to have to modify my htaccess and site settings every time I pull/push.
from scotch-box.
That was two years ago so I may have forgotten something, but I think it was all done in /apache2/extra/httpd-ssl.conf. That was Apache 2.4 and I don't remember a sites-available folder, so the setup may be different now. The lines I remember adding/enabling in httpd-ssl.conf are:
Listen 443
<VirtualHost mysitename.local:443>
DocumentRoot "C:/path-to-my-source-code/public_html"
<Directory "C:/path-to-my-source-code/public_html">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ServerName mysitename.local:443
LoadModule php5_module "C:/path-where-php-installed/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
SSLEngine on
SSLCertificateFile "C:/path-to-apache-install/conf/mysitename.local.crt"
SSLCertificateKeyFile "C:/path-to-apache-install/conf/mysitename.local.key"
</VirtualHost>
On Windows you also need to update the "hosts" file to recognise "mysitename.local" as 127.0.0.1. I think it's a similar process on Linux.
from scotch-box.
Related Issues (20)
- PHP Version with Pro
- Guest additions version outdated/incompatible HOT 3
- Can we get scotch.io to a LTS dist?
- SB 3.5 shows default home page for every project HOT 2
- Vagrant Up - Unable To Fetch HOT 2
- There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. HOT 1
- Laravel mix not working by default HOT 1
- Ubuntu 17.10 is EOL, and provisioning new box now fails as a result HOT 7
- Error with Craft CMS on Installation
- 38456 HOT 1
- Vagrant up not working HOT 1
- Vagrant up not working (MacOS) HOT 1
- Scotch Box 3.5 not running on macOS Catalina HOT 2
- Uncaught Error: Class 'PDO' not found HOT 1
- 403 Forbidden error when using NFS on MacOS Catalina HOT 1
- Invalid link HOT 1
- For NodeJS apps: nodemon doesn't work HOT 1
- PHP 5.6 is installed by default on the free version HOT 2
- the php version need be update to 7.4 HOT 1
- vagrant up error: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scotch-box.