Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> certyfikat jest samopodpisany
Crash89
post 28.01.2019, 15:14:04
Post #1





Grupa: Zarejestrowani
Postów: 191
Pomógł: 7
Dołączył: 3.04.2013

Ostrzeżenie: (0%)
-----


Witam,

Pobrałem projekt z bitbucketa i mam problem.
Nie mogę go uruchomić lokalnie bo mam błąd z certyfikatem: Certyfikat jest samopodpisany.
Chcę projekt uruchomić przez xamppa na localhoscie za pomocą virtual hosta.
Problem jest tylko z tym certyfikatem.

Próbowałem jakieś tutoriale z google gdzie tworzy się własny certyfikat ale to mi tylko zepsuło całego xamppa i muszę teraz wszystko konfigurować od nowa.

Dodam że projekt jest na laravel 5 i ustawiłem virtual host.

Ten post edytował Crash89 28.01.2019, 19:16:25
Go to the top of the page
+Quote Post
vokiel
post 29.01.2019, 12:33:32
Post #2





Grupa: Zarejestrowani
Postów: 2 592
Pomógł: 445
Dołączył: 12.03.2007

Ostrzeżenie: (0%)
-----


Samo-podpisany nie działa w nowych przeglądarkach. Utwórz certyfikat CA, dodaj go do zaufanych i na jego podstawie wystawiaj samo-podpisane.
Ewentualnie wyświetl certyfikat i dodaj go jako zaufany - ale tu nie mam pewności czy zadziała na pewno.

Tutoriale
https://ram.k0a1a.net/self-signed_https_cert_after_chrome_58
https://gist.github.com/Kmaschta/205a67e424...dd3530a0efe5945
https://github.com/FiloSottile/mkcert


--------------------
Go to the top of the page
+Quote Post
Crash89
post 29.01.2019, 16:30:40
Post #3





Grupa: Zarejestrowani
Postów: 191
Pomógł: 7
Dołączył: 3.04.2013

Ostrzeżenie: (0%)
-----


Cytat(vokiel @ 29.01.2019, 12:33:32 ) *
Samo-podpisany nie działa w nowych przeglądarkach. Utwórz certyfikat CA, dodaj go do zaufanych i na jego podstawie wystawiaj samo-podpisane.
Ewentualnie wyświetl certyfikat i dodaj go jako zaufany - ale tu nie mam pewności czy zadziała na pewno.

Tutoriale
https://ram.k0a1a.net/self-signed_https_cert_after_chrome_58
https://gist.github.com/Kmaschta/205a67e424...dd3530a0efe5945
https://github.com/FiloSottile/mkcert


Dzięki za tutoriale, zasugerowałem się pierwszym, ale nie jest tam napisane jak utworzyć certyfikat na podstawie tego CA.
niestety to co tam jest opisane nie zadziałało, a tylko spowodowało ponownie problem taki że apache mi nie startuje (nawet jak zmieniłem porty).
dlatego znowu muszę go przeinstalować i konfigurować wszystko od nowa.

EDIT:

Już wiem w czym może byc problem, nie wyłączyłem xamppa, ale takie ustawienia virtual hosta pod ssl powodują że apache nie startuje, robiłme je według tego:
https://florianbrinkmann.com/en/4215/https-...al-hosts-xampp/

Czy ja tutaj robię coś źle?

  1.  
  2. <VirtualHost 127.0.0.3:80>
  3. DocumentRoot "E:/xampp/htdocs/project/public"
  4. DirectoryIndex index.php
  5. <Directory "E:/xampp/htdocs/project/public">
  6. Options All
  7. AllowOverride All
  8. Order Allow,Deny
  9. Allow from all
  10. </Directory>
  11. </VirtualHost>
  12.  
  13. <VirtualHost 127.0.0.3:443>
  14. DocumentRoot "E:\xampp\htdocs\project\public"
  15. DirectoryIndex index.php
  16. ServerName server.berlin
  17. SSLEngine on
  18. SSLCertificateFile "E:\xampp\apache\ssl\server.crt"
  19. SSLCertificateKeyFile "E:\xampp\apache\ssl\server.key"
  20. <Directory "E:\xampp\htdocs\project\public"
  21. Order allow, deny
  22. Allow from all
  23. </Directory>
  24. </VirtualHost>


Takie ustawienia powodują że się apache nie uruchamia w xamppie.

Ten post edytował Crash89 29.01.2019, 17:45:47
Go to the top of the page
+Quote Post
viking
post 29.01.2019, 17:42:16
Post #4





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

Ostrzeżenie: (0%)
-----


https://prophp.pl/advice/show/9/jak_skonfig...lugi_openssl%3F


--------------------
Go to the top of the page
+Quote Post
Crash89
post 29.01.2019, 20:22:14
Post #5





Grupa: Zarejestrowani
Postów: 191
Pomógł: 7
Dołączył: 3.04.2013

Ostrzeżenie: (0%)
-----


Cytat(viking @ 29.01.2019, 17:42:16 ) *


Teraz mam coś takiego i z tym dalej apache nie startuje:

  1.  
  2. <VirtualHost *:443>
  3. SSLEngine on
  4. SSLCertificateFile "e:/xampp/apache/conf/ssl.crt/server.crt"
  5. SSLCertificateKeyFile "e:/xampp/apache/conf/ssl.key/server.key"
  6. ServerName server.berlin
  7. DocumentRoot "e:/xampp/htdocs/project/public"
  8. <Directory "e:/xampp/htdocs/project/public"
  9. Options Indexes FollowSymLinks MultiViews Includes ExecCGI
  10. AllowOverride All
  11. Order deny,allow
  12. Allow from all
  13. </Directory>
  14. </VirtualHost>
  15.  
  16.  


Prosze o pomoc, bo za długo już się z tym mecze
Go to the top of the page
+Quote Post
viking
post 29.01.2019, 20:38:52
Post #6





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

Ostrzeżenie: (0%)
-----


Uruchom z wiersza poleceń i podaj konkretny komunikat błędu. Przetestuj wcześniej konfigurację.


--------------------
Go to the top of the page
+Quote Post
Crash89
post 29.01.2019, 21:07:35
Post #7





Grupa: Zarejestrowani
Postów: 191
Pomógł: 7
Dołączył: 3.04.2013

Ostrzeżenie: (0%)
-----


Cytat(viking @ 29.01.2019, 20:38:52 ) *
Uruchom z wiersza poleceń i podaj konkretny komunikat błędu. Przetestuj wcześniej konfigurację.


Z konsoli tego nie uruchomie bo to jest na xamppie wszystko.
Ale komunikaty błędu są takie:


Status change detected: stopped
21:05:40 [Apache] Error: Apache shutdown unexpectedly.
21:05:40 [Apache] This may be due to a blocked port, missing dependencies,
21:05:40 [Apache] improper privileges, a crash, or a shutdown by another method.
21:05:40 [Apache] Press the Logs button to view error logs and check
21:05:40 [Apache] the Windows Event Viewer for more clues
21:05:40 [Apache] If you need more help, copy and post this
21:05:40 [Apache] entire log window on the forums


A w pliku Apache error.log takie komunikaty:


[mpm_winnt:notice] [pid 26572:tid 716] AH00455: Apache/2.4.37 (Win32) OpenSSL/1.1.1a PHP/7.3.0 configured -- resuming normal operations
[Tue Jan 29 20:31:58.969464 2019] [mpm_winnt:notice] [pid 26572:tid 716] AH00456: Apache Lounge VC15 Server built: Nov 21 2018 11:27:36
[Tue Jan 29 20:31:58.969464 2019] [core:notice] [pid 26572:tid 716] AH00094: Command line: 'e:\\xampp\\apache\\bin\\httpd.exe -d E:/xampp/apache'
[Tue Jan 29 20:31:58.971466 2019] [mpm_winnt:notice] [pid 26572:tid 716] AH00418: Parent: Created child process 28440
[Tue Jan 29 20:31:59.483845 2019] [ssl:warn] [pid 28440:tid 724] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Jan 29 20:31:59.514493 2019] [ssl:warn] [pid 28440:tid 724] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Jan 29 20:31:59.537514 2019] [mpm_winnt:notice] [pid 28440:tid 724] AH00354: Child: Starting 150 worker threads.

Go to the top of the page
+Quote Post
vokiel
post 31.01.2019, 23:58:21
Post #8





Grupa: Zarejestrowani
Postów: 2 592
Pomógł: 445
Dołączył: 12.03.2007

Ostrzeżenie: (0%)
-----


Masz przecież w logu napisane że nazwa serwera nie pasuje do certyfikatu.

Kod
AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name


--------------------
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.03.2024 - 17:53