0

I have a Rails 4 project where need to setup SSL certificates but sub-domain wise.

Actually, in my project users can create account with subdomain then users can setup own SSL certificates which will be use them subdomain site.

Like: xyz.mainsite.com, abc.mainsite.com

As per above example xyz.mainsite.com can use them own SSL certificates and same way for abc.

Any one have idea, how to manage or handle it ?

Thanks

1 Answer 1

0

There are few possibilites for this based on the web server you are using.

For example, if you are using Nginx, you can try this

If you are using Apache web server, you can try this

If you want to dynamically configure the SSL certificate at user action, then you can to write shell script to modify the file contents and call the shell script from your Rails code.

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

2 Comments

Thanks @Jay for answers here. Do you have any experience or how to call Shell scripts from Rails. Any idea then share which will be more use for me.
Modifying the file contents can be possible in many ways. Like you can do it in shell script or ruby script, etc. You can try ruby script if you are comfortable. Since you asked about calling shell script from Rails - stackoverflow.com/questions/12299231/…

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.