During execution in my Rails web app, I need to create a virtual host
config on my Linux server, but I don’t know what would be the best way
to do it , here are the steps ( my_domain.com is fixed, only
my_subdomain is changing dynamically
During execution in my Rails web app, I need to create a virtual host
config on my Linux server, but I don’t know what would be the best way
to do it , here are the steps ( my_domain.com is fixed, only
my_subdomain is changing dynamically
Not answering your question, but have you considered having a single
wildcard virtual host (i.e. ServerName *.mydomain.com) rather than
reconfiguring apache on the fly all the time?
During execution in my Rails web app, I need to create a virtual host
config on my Linux server, but I don’t know what would be the best way
to do it , here are the steps ( my_domain.com is fixed, only
my_subdomain is changing dynamically
I tried something similar in my PHP-days.
You really should not do that!
1.) Plesk would not be aware of that subdomain
2.) Plesk could overwrite or delete the manually added configs when
trying to add the subdomain in Plesk
That are the main problems I stumbled upon that time.
The way with wild card domains all going to your rails app are much
better. But I cant remember how to set them up in Plesk.
I intended to use the Plesk API to add the new subdomain and the new
subdomain ghost.conf, then exec reconfig domain and reload Apache…
( the way we use to do manually in Plesk console) but it’s quite
heavy work…
I found how to setup wild card w Plesk … :
(quite weird…)
and it’s running fine … can access any sub-domain…
Thanks a lot for your feedback !
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.