Hi all,
This is my sample code in /etc/httpd/conf.d/applications.conf file currently we are creating subdomain mannually for every new subdomain. I want to automate this process througs bash script , how its possible.
Code:
<VirtualHost *:80>
ServerName google.com
ServerAlias google.com
DocumentRoot "/usr/local/tomcat/webapps/google"
<Directory "/usr/local/tomcat/webapps/google">
DirectoryIndex index.jsp index.html
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
JkOptions +ForwardURICompat
JkMount /google* ajp13
RewriteEngine On
RewriteLogLevel 5
RewriteLog logs/internal_rewrite_log
RewriteCond %{REQUEST_URI} !^/google/.*\.(jpe?g|gif|png|css|js)
RewriteRule ^(.*)$ /google/$1 [L,PT]
</VirtualHost>
In this code which i marked BOLD that content only we'l change for every subdomain. while manually doing this most of the times errors are coming to avoid that i need to automate this process. please guide me to write the script for this...
Thanks and Regards
V.Anish Kumar.