SSL laravel forge in default site -
I have read up to set up SSL for my Larvel site. I did not read everything (oops), and did not remove the "default" site. I have generated CSR from the default site (but with domain for example.com) now I have a certificate and I used to do it through Laurel Forge Installed, but it does not work:
- (browser / curl) can not connect to
- does not redirect to https
-
/var/log/nginx/default-error.log
- I have nothing at nginx again Initially the
Here are my / etc / nginx / sites-available / default
file content:
server {80; #server_name Default; Server_name example.com www.example.com; # Return 301 default $ request_uri; Return 301 https: //example.com$request_uri; } Server {443 SSL; #server_name Default; Server_name example.com www.example.com; Root / home / forge / default / public; #forge ssl (do not reply!) Ssl_certificate /etc/nginx/ssl/default/XXXXX/server.crt; Ssl_certificate_key /etc/nginx/ssl/default/XXXXX/server.key; Index index index.htm index.php; Charset UTF-8; Place / {try_files $ uri $ uri / /index.php?$query_string; } Location = /favicon.ico {access_log off; Log_not_found off; } Location = /robots.txt {access_log off; Log_not_found off; } Access_log off; Error_log /var/log/nginx/default-error.log Error; Error_page 404 / indix.fp; Place ~ \ .php $ {fastcgi_split_path_info ^ (. + .php) (/.+) $; Fastcgi_pass Unix: /var/run/php5-fpm.sock; Fastcgi_index index.php; Includes fastcgi_params; } Place ~ /\.ht {reject all; }}
What can I do to make it work?
OK, this was a certificate problem. I tried nginx -t
and there was an error, now I restarted all the process and now everything is fine.
Comments
Post a Comment