programming to run linux shell scripts.

Discussion in 'Software' started by mastermosley, Nov 21, 2007.

  1. mastermosley

    mastermosley Sergeant

    I'm working on a webhosting server and I'm going to be offering free webhosting, i got my Apache2 server all set up for virtual hosts ect, but I want insant activation. How would I go about making .cgi or .php script that would take the opropriate shell commands and do them automatically?
     
  2. Wookie

    Wookie Sergeant Major

    Well you can use the exec program of php to execute a script and pass it some string variables as parameters

    http://us2.php.net/shell_exec

    you would then probably need some sort of configuration for for apache that has the domain setups depending on how you want to do it, most servers (i think) make a user and apache shares the users home directory (there is an option for this in the apache conf file)

    so the script would probably need to make use of useradd, setting passwords and you probably want to install ssh server for access or an ftp server.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds