LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   when call shell script file from php (https://www.linuxquestions.org/questions/programming-9/when-call-shell-script-file-from-php-652808/)

mohan.aturheart 07-01-2008 08:18 AM

when call shell script file from php
 
Dear all,

I am calling a shell script file from php. This shell script file handles sub domain creation scripts.

I am given here the model script to create sub domain creation

In that for variable $droot we assign the path of folder in server.
$server_ip - IP address, $1 - subddomain value for example :xyz, in variable $4 - we assign the domain name for ex: - mohan.systems.com

touch /etc/httpd/clients/$1.$4.conf
echo "<VirtualHost $server_ip:80>" >> /etc/httpd/clients/$1.$4.conf
echo "ServerAdmin root@localhost" >> /etc/httpd/clients/$1.$4.conf
echo "DocumentRoot $droot/$1" >> /etc/httpd/clients/$1.$4.conf
echo "ServerName $1.$4" >> /etc/httpd/clients/$1.$4.conf
echo "ErrorLog logs/$1.$4-error_log" >> /etc/httpd/clients/$1.$4.conf
echo "CustomLog logs/$1.$4-access_log common" >> /etc/httpd/clients/$1.$4.conf
echo "</VirtualHost>" >> /etc/httpd/clients/$1.$4.conf
echo "<VirtualHost $server_ip:443>" >> /etc/httpd/clients/$1.$4.conf
echo "SSLEngine on" >> /etc/httpd/clients/$1.$4.conf
echo "SSLCertificateFile /etc/httpd/conf/ssl.crt/besdssacrt.crt" >> /etc/httpd/clients/$1.$4.conf
echo "SSLCertificateKeyFile /etc/httpd/conf/ssl.key/betaseddskey.key" >> /etc/httpd/clients/$1.$4.conf
echo "ServerAdmin root@localhost" >> /etc/httpd/clients/$1.$4.conf
echo "DocumentRoot $droot/$1" >> /etc/httpd/clients/$1.$4.conf
echo "ServerName $1.$4.com" >> /etc/httpd/clients/$1.$4.conf
echo "ErrorLog logs/$1.$4-error_log" >> /etc/httpd/clients/$1.$4conf
echo "CustomLog logs/$1.$4-access_log common" >> /etc/httpd/clients/$1.$4.conf
echo "</VirtualHost>" >> /etc/httpd/clients/$1.$4.conf
/etc/init.d/httpd reload


They raise the error in error log as - [warn] RSA server certificate CommonName (CN) `xyz.mohan.systems.com' does NOT match server name!?


and the subdomain is not reloaded. After we reload manually the website page get works.

Mr. C. 07-02-2008 01:33 AM

duplicate thread.


All times are GMT -5. The time now is 03:56 PM.