I am creating a subdomain through virtual hosts on openSuse linux using java. Eveerything goes fine but the when i try to reload apache through java code it shows document root directory of some other subdomain but the url in the address bar is correctly shown. I am using the following code:-
Runtime .getRuntime.exec(sh apacheReload.sh);
where apacheReload.sh is my bash file that contains:-
But when i try to reload the apache through console it works fine.