Laravel valet secure does not work and where is nginx information coming from after deletion?

Viewed 4502

So I am working on Laravel/Valet, I was trying to use ssl. So I ran:

valet secure examplesite 

This did not work. I have uninstalled valet, cleared cache, remove laravel/valet. Nothing worked. I just could not open the https://examplesite.test site. However, the non-secure http site is working fine.

Question 1: How can I get this to work? I am on MAC OS Sierra.

Question 2: Even after removing nginx and valet, I am still seeing something like the image shown like this image when I load the page. Where is the information about the server nginx coming from?

Thank you very much.

3 Answers

So after running valet secure in the same directory of the web project;

I ran the code below:

    sudo nginx -s stop && sudo nginx

Run

cd examplesite
valet secure

Without arguments inside the directory of your website

As for the error page you see there, it's hardcoded in the Nginx ngx_http_special_response

static char ngx_http_error_502_page[] =
"<html>" CRLF
"<head><title>502 Bad Gateway</title></head>" CRLF
"<body>" CRLF
"<center><h1>502 Bad Gateway</h1></center>" CRLF
;

For Windows 10 users:

Step 1: Open cmd in administrator (sudo equivalent of linux)

Step 2: valet stop if valet is already running

Step 3: cd into your project directory (this is the most important step)

Step 4: valet secure

Step 5: valet start

Related