404 error | Page not found after enabling SSL (and disabling)
-
Hi,
I was working since days without any issues and...
I tried to enable ssl with Menu Apache | SSL | Enabled.
Now nothing works anymore, every time I try to login into my Laravel App :http://app.local/public/admin/login
I constantly have an 404 error | Page not found.
I disabled the ssl with Menu Apache | SSL | Disabled.
Restarted several times the server or Laragon, but still the same error.I have less knowledge in dealing with server, so I would appreciate some help here in order to fix this, since I can't work, I'm totally stuck...
Thank you in advance for you support.
Laragon version :4.0.16 | PHP 7.2.2
-
@marcq : When you have issues, the first place you should check is the logs.
If you enable SSL, you should go:
https://app.localFurthermore, only the link
http://app.local/public/admin/login
has 404 or all of your links?
-
Thank you @leokhoa
I'm using a dashboard (CRUDBOOSTER package) and the link to login is in fact
http://mage.local/public/admin/login (without public when in production).
I can access http://mage.local but it is the regular Laravel home page which is working.
I can not access other page, since all the pages of my app need a login so I can not say if other pages have the same issue.
-
@leokhoa
Error log[Fri Oct 04 09:05:01.086523 2019] [mpm_winnt:notice] [pid 6372:tid 672] AH00455: Apache/2.4.29 (Win64) OpenSSL/1.1.0g PHP/7.2.2 configured -- resuming normal operations
[Fri Oct 04 09:05:01.086523 2019] [mpm_winnt:notice] [pid 6372:tid 672] AH00456: Apache Lounge VC15 Server built: Nov 3 2017 11:12:00
[Fri Oct 04 09:05:01.086523 2019] [core:notice] [pid 6372:tid 672] AH00094: Command line: 'C:\laragon\bin\apache\httpd-2.4.29-win64-VC15\bin\httpd -d C:/laragon/bin/apache/httpd-2.4.29-Win64-VC15'
[Fri Oct 04 09:05:01.089520 2019] [mpm_winnt:notice] [pid 6372:tid 672] AH00418: Parent: Created child process 13816
AH00112: Warning: DocumentRoot [C:/laragon/www/mage/] does not exist
AH00112: Warning: DocumentRoot [C:/laragon/www/mage/] does not exist
[Fri Oct 04 09:05:02.164412 2019] [mpm_winnt:notice] [pid 13816:tid 640] AH00354: Child: Starting 64 worker threads.but in fact the root exists in my www folder (mage app folder exists)
-
Obviously enabling and disabling ssl has changed something since before this I logged in with :
http://app.local/public/admin/login
and now it is working with
and I can access all pages.
@leokhoa sorry to have bother you with this, since I haven't checked it before opening this topic. It seems to work so I close this one, I just have broken link (to images). Thank you anyway. A last question, do you have a tutorial how to enable SSL on laragon ?
-
@marcq : Enabling SSL triggers new configuration file for Virtual Host. The templates are located in:
{LARAGON_ROOT}\usr\tpl
In the past, you DocumentRoot was point to
C:/laragon/yourproject
When you enable SSL, Laragon detects that you have apublic
folder and it updates new configuration with DocumentRoot points toC:/laragon/yourproject/public
.You can now enable SSL with 1 click and access your page with this link:
https://app.local/admin/loginNow, you test env and prod env have the same format
-
That's great news, thanks a lot
I didn't think I have a certificate implemented, can I use a letsencrypt certificate with auto-renewal ? If yes do you have a tutorial how I can do it in Laragon ?
-
@marcq : On local you don't need LetEncrypt. Laragon will create new self- certificates for you and add to Trust Store. Your browsers should display the green lock icon. It's Laragon magic so you don't need to do anything.
It's a powerful feature of Laragon but not so many people know. I will create an article on that when having time.
-
As you said "Magic" ! Thank you for your time, support and this great "swiss tool". Much appreciated, cheers