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.

4
  • stackoverflow.com/questions/12235876/… Commented Nov 15, 2018 at 15:32
  • 1
    I would recommend to use the standard xAMP stack for PHP. e.g. WAMP for Windows. To enable SSL you then can use ngrok, which will give you an external HTTPS URL that is redirected to your localhost. That is what I am using and it works. Commented Nov 15, 2018 at 15:36
  • Anything that has Apache or Nginx! WAMPServer or XAMPP or there are a few other Commented Nov 15, 2018 at 15:36
  • Of course we are assuming you are a windows user Commented Nov 15, 2018 at 15:38

2 Answers 2

3

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

Sign up to request clarification or add additional context in comments.

3 Comments

so far, the easiest and fastest way to get it done
@dsncode How did you implement ngrok on PHP built in webserver? thanks.
@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 ngrok.com/docs
1

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

Note : windows

2 Comments

it's really fast and easy to setup. There will be a little confusion when you find a port conflict, but solving it is a piece of cake, just go to setting above it.
But how you would debug with laragon?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.