Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valet secure hangs but does add SSL however the site will not load with https. #1263

Closed
joe-scotto opened this issue Jun 10, 2022 · 1 comment

Comments

@joe-scotto
Copy link

Description:

When running valet secure it just hangs and never does anything. If I restart valet and then run it again followed by an additional restart valet links will show that the site has SSL enabled but when I visit it with https in the browser it fails to load. My site is just a blank laravel new project and it works on http.

Steps To Reproduce:

Run valet secure from the site directory.

Diagnosis

<details>
<summary>sw_vers</summary>
<pre>ProductName:	macOS
ProductVersion:	12.3.1
BuildVersion:	21E258</pre>
</details>
<details>
<summary>valet --version</summary>
<pre>Laravel Valet 3.1.7</pre>
</details>
<details>
<summary>cat ~/.config/valet/config.json</summary>
<pre>{
    "tld": "test",
    "loopback": "127.0.0.1",
    "paths": [
        "/Users/jscotto/.config/valet/Sites"
    ]
}</pre>
</details>
<details>
<summary>cat ~/.composer/composer.json</summary>
<pre>{
    "require": {
        "laravel/installer": "^4.2",
        "laravel/valet": "^3.1"
    }
}</pre>
</details>
<details>
<summary>composer global diagnose</summary>
<pre>Changed current directory to /Users/jscotto/.composer
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.3.7
PHP version: 8.1.7
PHP binary path: /usr/local/Cellar/php/8.1.7/bin/php
OpenSSL version: OpenSSL 1.1.1o  3 May 2022
cURL version: 7.83.1 libz 1.2.11 ssl (SecureTransport) OpenSSL/1.1.1o
zip: extension present, unzip present, 7-Zip not available</pre>
</details>
<details>
<summary>composer global outdated</summary>
<pre>Changed current directory to /Users/jscotto/.composer
Legend:
! patch or minor release available - update recommended
~ major release available - update possible
tightenco/collect v8.83.15 ~ v9.16.0 Collect - Illuminate Collections as a s...</pre>
</details>
<details>
<summary>ls -al /etc/sudoers.d/</summary>
<pre>total 16
drwxr-xr-x   4 root  wheel   128 Apr 16 10:59 .
drwxr-xr-x  81 root  wheel  2592 Jun  1 16:28 ..
-rw-r--r--   1 root  wheel    80 Jun 30  2021 brew
-rw-r--r--   1 root  wheel    83 Jun 30  2021 valet</pre>
</details>
<details>
<summary>brew config</summary>
<pre>HOMEBREW_VERSION: 3.5.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2258ba5797c1ea8149a49673b5c080011c366237
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 638615e61b1ad8c8e3a551d36a52d545016b3cfa
Core tap last commit: 64 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_MAKE_JOBS: 16
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 13.0.0 build 1300
Git: 2.32.0 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.3.1-x86_64
CLT: 12.0.0.32.2
Xcode: 13.2</pre>
</details>
<details>
<summary>brew services list</summary>
<pre>Name    Status User File
dnsmasq none            root 
nginx   error  256      root ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php     none            root</pre>
</details>
<details>
<summary>brew list --formula --versions | grep -E "(php|nginx|dnsmasq|mariadb|mysql|mailhog|openssl)(@\d\..*)?\s"</summary>
<pre>dnsmasq 2.86
nginx 1.21.6_1
[email protected] 1.1.1o
php 8.1.7</pre>
</details>
<details>
<summary>brew outdated</summary>
<pre></pre>
</details>
<details>
<summary>brew tap</summary>
<pre>homebrew/cask
homebrew/core
homebrew/services
osx-cross/arm
osx-cross/avr
qmk/qmk</pre>
</details>
<details>
<summary>php -v</summary>
<pre>PHP 8.1.7 (cli) (built: Jun  9 2022 14:21:07) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.7, Copyright (c), by Zend Technologies</pre>
</details>
<details>
<summary>which -a php</summary>
<pre>/usr/local/bin/php</pre>
</details>
<details>
<summary>php --ini</summary>
<pre>Configuration File (php.ini) Path: /usr/local/etc/php/8.1
Loaded Configuration File:         /usr/local/etc/php/8.1/php.ini
Scan for additional .ini files in: /usr/local/etc/php/8.1/conf.d
Additional .ini files parsed:      /usr/local/etc/php/8.1/conf.d/error_log.ini,
/usr/local/etc/php/8.1/conf.d/ext-opcache.ini,
/usr/local/etc/php/8.1/conf.d/php-memory-limits.ini</pre>
</details>
<details>
<summary>nginx -v</summary>
<pre>nginx version: nginx/1.21.6</pre>
</details>
<details>
<summary>curl --version</summary>
<pre>curl 7.79.1 (x86_64-apple-darwin21.0) libcurl/7.79.1 (SecureTransport) LibreSSL/3.3.5 zlib/1.2.11 nghttp2/1.45.1
Release-Date: 2021-09-22
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets</pre>
</details>
<details>
<summary>php --ri curl</summary>
<pre>curl

cURL support => enabled
cURL Information => 7.83.1
Age => 9
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => Yes
SSL => Yes
SSPI => No
TLS-SRP => Yes
HTTP2 => Yes
GSSAPI => Yes
KERBEROS5 => Yes
UNIX_SOCKETS => Yes
PSL => No
HTTPS_PROXY => Yes
MULTI_SSL => Yes
BROTLI => Yes
Protocols => dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, ldap, ldaps, mqtt, pop3, pop3s, rtmp, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host => x86_64-apple-darwin21.3.0
SSL Version => (SecureTransport) OpenSSL/1.1.1o
ZLib Version => 1.2.11
libSSH Version => libssh2/1.10.0

Directive => Local Value => Master Value
curl.cainfo => no value => no value</pre>
</details>
<details>
<summary>~/.composer/vendor/laravel/valet/bin/ngrok version</summary>
<pre>ngrok version 2.3.40</pre>
</details>
<details>
<summary>ls -al ~/.ngrok2</summary>
<pre>ls: /Users/jscotto/.ngrok2: No such file or directory</pre>
</details>
<details>
<summary>brew info nginx</summary>
<pre>nginx: stable 1.21.6 (bottled), HEAD
HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
https://nginx.org/
/usr/local/Cellar/nginx/1.21.6_1 (26 files, 2.2MB) *
  Poured from bottle on 2022-06-10 at 13:09:04
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/nginx.rb
License: BSD-2-Clause
==> Dependencies
Required: [email protected], pcre2
==> Options
--HEAD
	Install HEAD version
==> Caveats
Docroot is: /usr/local/var/www

The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /usr/local/etc/nginx/servers/.

To restart nginx after an upgrade:
  brew services restart nginx
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/nginx/bin/nginx -g daemon off;
==> Analytics
install: 25,949 (30 days), 93,519 (90 days), 454,910 (365 days)
install-on-request: 25,905 (30 days), 93,315 (90 days), 453,967 (365 days)
build-error: 18 (30 days)</pre>
</details>
<details>
<summary>brew info php</summary>
<pre>php: stable 8.1.7 (bottled), HEAD
General-purpose scripting language
https://www.php.net/
/usr/local/Cellar/php/8.1.7 (513 files, 80.1MB) *
  Poured from bottle on 2022-06-10 at 13:06:46
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/php.rb
License: PHP-3.01
==> Dependencies
Build: httpd, pkg-config
Required: apr, apr-util, argon2, aspell, autoconf, curl, freetds, gd, gettext, gmp, icu4c, krb5, libpq, libsodium, libzip, oniguruma, openldap, [email protected], pcre2, sqlite, tidy-html5, unixodbc
==> Options
--HEAD
	Install HEAD version
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so

    <FilesMatch \.php$>
        SetHandler application/x-httpd-php
    </FilesMatch>

Finally, check DirectoryIndex includes index.php
    DirectoryIndex index.php index.html

The php.ini and php-fpm.ini file can be found in:
    /usr/local/etc/php/8.1/

To restart php after an upgrade:
  brew services restart php
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/php/sbin/php-fpm --nodaemonize
==> Analytics
install: 104,763 (30 days), 351,441 (90 days), 1,105,173 (365 days)
install-on-request: 90,036 (30 days), 299,402 (90 days), 950,233 (365 days)
build-error: 30 (30 days)</pre>
</details>
<details>
<summary>brew info openssl</summary>
<pre>openssl@3: stable 3.0.3 (bottled) [keg-only]
Cryptography and SSL/TLS Toolkit
https://openssl.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/[email protected]
License: Apache-2.0
==> Dependencies
Required: ca-certificates
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@3/certs

and run
  /usr/local/opt/openssl@3/bin/c_rehash

openssl@3 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

==> Analytics
install: 137,635 (30 days), 449,281 (90 days), 995,856 (365 days)
install-on-request: 113,094 (30 days), 363,685 (90 days), 791,601 (365 days)
build-error: 4,447 (30 days)</pre>
</details>
<details>
<summary>openssl version -a</summary>
<pre>LibreSSL 2.8.3
built on: date not available
platform: information not available
options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx) 
compiler: information not available
OPENSSLDIR: "/private/etc/ssl"</pre>
</details>
<details>
<summary>openssl ciphers</summary>
<pre>ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:GOST2012256-GOST89-GOST89:DHE-RSA-CAMELLIA256-SHA256:DHE-RSA-CAMELLIA256-SHA:GOST2001-GOST89-GOST89:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA256:CAMELLIA256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-CAMELLIA128-SHA256:DHE-RSA-CAMELLIA128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:CAMELLIA128-SHA256:CAMELLIA128-SHA:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:RC4-SHA:RC4-MD5:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:DES-CBC3-SHA</pre>
</details>
<details>
<summary>sudo nginx -t</summary>
<pre>nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful</pre>
</details>
<details>
<summary>which -a php-fpm</summary>
<pre></pre>
</details>
<details>
<summary>/usr/local/opt/php/sbin/php-fpm -v</summary>
<pre>PHP 8.1.7 (fpm-fcgi) (built: Jun  9 2022 14:21:18)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.7, Copyright (c), by Zend Technologies</pre>
</details>
<details>
<summary>sudo /usr/local/opt/php/sbin/php-fpm -y /usr/local/etc/php/8.1/php-fpm.conf --test</summary>
<pre>[10-Jun-2022 13:11:33] NOTICE: configuration file /usr/local/etc/php/8.1/php-fpm.conf test is successful</pre>
</details>
<details>
<summary>ls -al ~/Library/LaunchAgents | grep homebrew</summary>
<pre>-rw-r--r--    1 jscotto  staff   484 Jun 10 11:38 homebrew.mxcl.nginx.plist</pre>
</details>
<details>
<summary>ls -al /Library/LaunchAgents | grep homebrew</summary>
<pre></pre>
</details>
<details>
<summary>ls -al /Library/LaunchDaemons | grep homebrew</summary>
<pre>-rw-r--r--   1 root  admin   593 Jun 10 13:09 homebrew.mxcl.dnsmasq.plist
-rw-r--r--   1 root  admin   484 Jun 10 13:09 homebrew.mxcl.nginx.plist
-rw-r--r--   1 root  admin   577 Jun 10 13:09 homebrew.mxcl.php.plist</pre>
</details>
<details>
<summary>ls -al /Library/LaunchDaemons | grep "com.laravel.valet."</summary>
<pre></pre>
</details>
<details>
<summary>ls -aln /etc/resolv.conf</summary>
<pre>lrwxr-xr-x  1 0  0  22 Mar 26 03:21 /etc/resolv.conf -> ../var/run/resolv.conf</pre>
</details>
<details>
<summary>cat /etc/resolv.conf</summary>
<pre>#
# macOS Notice
#
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
#
# To view the DNS configuration used by this system, use:
#   scutil --dns
#
# SEE ALSO
#   dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
nameserver 192.168.0.1
nameserver 192.168.0.1</pre>
</details>
<details>
<summary>ifconfig lo0</summary>
<pre>lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
	inet 127.0.0.1 netmask 0xff000000 
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	nd6 options=201<PERFORMNUD,DAD></pre>
</details>
<details>
<summary>sh -c 'echo "------\n/usr/local/etc/nginx/valet/valet.conf\n---\n"; cat /usr/local/etc/nginx/valet/valet.conf | grep -n "# valet loopback"; echo "\n------\n"'</summary>
<pre>------
/usr/local/etc/nginx/valet/valet.conf
---

3:    #listen VALET_LOOPBACK:80; # valet loopback

------</pre>
</details>
<details>
<summary>sh -c 'for file in ~/.config/valet/dnsmasq.d/*; do echo "------\n~/.config/valet/dnsmasq.d/$(basename $file)\n---\n"; cat $file; echo "\n------\n"; done'</summary>
<pre>------
~/.config/valet/dnsmasq.d/tld-test.conf
---

address=/.test/127.0.0.1
listen-address=127.0.0.1

------</pre>
</details>
<details>
<summary>sh -c 'for file in ~/.config/valet/nginx/*; do echo "------\n~/.config/valet/nginx/$(basename $file)\n---\n"; cat $file | grep -n "# valet loopback"; echo "\n------\n"; done'</summary>
<pre>------
~/.config/valet/nginx/*
---

cat: /Users/jscotto/.config/valet/nginx/*: No such file or directory

------</pre>
</details>
@driesvints
Copy link
Member

Heya, this is a duplicate of #1224 and is continued in #1226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants