artyom-beilis / cppcms

CppCMS Framework
Other
443 stars 107 forks source link

how to change the site configuration (config.js) from http to https #57

Closed Hethsron closed 5 years ago

Hethsron commented 5 years ago

@artyom-beilis how to change the site configuration (config.js) from http to https?

masaoliou commented 5 years ago

CppCMS is scheme agnostic. You want to configure HTTP server instead.

Hethsron commented 5 years ago

@masaoliou yes I want to configure http server instead.

Hethsron commented 5 years ago

And redirect all my http requests to https

Hethsron commented 5 years ago

I thought it was enough to add certificates in the config.js file

Hethsron commented 5 years ago

But I didn't find anything about it in the doc of CppCMS

Hethsron commented 5 years ago

@masaoliou So if you have an idea to solve my problem I am ready to know it beyond to find myself

idkCpp commented 5 years ago

You need a reverse proxy in front of CppCMS. Like Apache.

This link will help you configuring Apache for HTTPS redirection: https://stackoverflow.com/questions/16200501/http-to-https-apache-redirection

And this link will help you integrate your CppCMS App with Apache: http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config#Apache..FastCGI

artyom-beilis commented 5 years ago

http is not supported by CppCMS yet. So as @idkCpp said, you need to use any kind of HTTPs server as frontend like apache, nginx, lighttpd and connect it via http/fastcgi/scgi protocol

The https support is on the roadmap: http://cppcms.com/wikipp/en/page/cppcms_1x_tasks

Hethsron commented 5 years ago

Thanks for this advice @idkCpp @artyom-beilis