LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 07-01-2008, 08:18 AM   #1
mohan.aturheart
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Rep: Reputation: 0
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.
 
Old 07-02-2008, 01:33 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
duplicate thread.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a value from a shell script to a php file kushalkoolwal Programming 4 07-07-2010 06:25 AM
Makefile call shell script thllgo Programming 4 12-28-2005 09:51 AM
Shell Script call API treotan Programming 1 08-22-2005 10:59 PM
call a c program in a shell script jagman Programming 4 04-05-2005 04:58 PM
Call a shell script from php? jharper101 Programming 2 02-15-2005 12:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration