3

I'm searching for the server which allows to launch php files with ssl. I've tried for example python simple server:

import BaseHTTPServer, SimpleHTTPServer
import ssl

httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, keyfile='privkeyA.pem', certfile='certA.crt', server_side=True)
print("Server is working!")
httpd.serve_forever()

Certificate and key works well, but I can only launch html files, because this server doesn't support php ones.

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114
J.G.
  • 103
  • 1
  • 6
  • https://stackoverflow.com/questions/12235876/python-simplehttpserver-with-php – noid Nov 15 '18 at 15:32
  • 1
    I would recommend to use the standard xAMP stack for PHP. e.g. [WAMP](https://sourceforge.net/projects/wampserver/) for Windows. To enable SSL you then can use [ngrok](https://ngrok.com/), which will give you an external HTTPS URL that is redirected to your `localhost`. That is what I am using and it works. – Erik Kalkoken Nov 15 '18 at 15:36
  • Anything that has Apache or Nginx! `WAMPServer` or `XAMPP` or there are a few other – RiggsFolly Nov 15 '18 at 15:36
  • Of course we are assuming you are a windows user – RiggsFolly Nov 15 '18 at 15:38

2 Answers2

3

Use can use Php Build in Server + ngrok for getting Https+SSL

storm
  • 31
  • 3
  • 1
    so far, the easiest and fastest way to get it done – dsncode May 08 '21 at 13:17
  • @dsncode How did you implement ngrok on PHP built in webserver? thanks. – Isabella Nov 04 '21 at 16:20
  • 1
    @Isabella just create your server and enable ngrok in your development server. then expose your app port through ngrok. then you got free dynamic url and ssl endpoint. you can follow the instructions on ngrok website https://ngrok.com/docs – dsncode Nov 05 '21 at 07:57
1

im using laragon now, its built-in ssl , and they support cool things https://laragon.org/download/index.html

Note : windows

Thomas Jeriko
  • 213
  • 3
  • 13