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
1- create: /var/www/vhosts/my_domain.com/subdomains/my_subdomain/conf/
.. content is always the same...
2 - run : sudo /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain
.. 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]