On Nov 15, 7:37 am, Erwin <[email protected]> wrote:
> 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?

Fred

> 1- create:  /var/www/vhosts/my_domain.com/subdomains/my_subdomain/conf/
> vhost.conf
>
> ServerName mysubdomain.mydomain.com
> .. content is always the same...
>
> 2 - run : sudo /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain
> my_domain.com
> .. always the same command
>
> 3 - run :  sudo /etc/init.d/apache2  reload
>
> What could be the best option to set/execute such script from my Rails
> web app ? any links ?
> thanks for your feedback and guidances
>
> [Running Rails 3.1.1/Ruby 1.9.3/ Debian 6 Squeeze]

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to