Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/270.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
apachewebserver-PHP-dynamicvhost-Shell_Php_Bash_Apache_Shell_Web - Fatal编程技术网

apachewebserver-PHP-dynamicvhost-Shell

apachewebserver-PHP-dynamicvhost-Shell,php,bash,apache,shell,web,Php,Bash,Apache,Shell,Web,谢谢你抽出时间。我的学业有问题。我们必须创造 apache上的Web服务器,带有用于注册“域”的gui。服务器 是VPN,例如,域名不是domain.cz,而是 domain.ourserver.cz 工作原理: PHP运行shell脚本,如下所示:(这是测试版本) 脚本不会返回错误,看起来一切正常,用户不会 创造 我们的目录结构: /var/www/ - webscript.sh - passfile (two same rows with password for pure-pw

谢谢你抽出时间。我的学业有问题。我们必须创造 apache上的Web服务器,带有用于注册“域”的gui。服务器 是VPN,例如,域名不是domain.cz,而是 domain.ourserver.cz

工作原理:

PHP运行shell脚本,如下所示:(这是测试版本)

脚本不会返回错误,看起来一切正常,用户不会 创造

我们的目录结构:

/var/www/
  -  webscript.sh
  -  passfile (two same rows with password for pure-pw useradd in out of script is deleted)
  -  fei-ispwe-5 (domain directory)
      - sourcecode of main page
  -  other directory, created by webscript.sh for Dyn. vhost
      - index.html (generated from webscript.sh)
将创建密码文件,并包含两个具有密码的相同行。文件夹也创建成功,如果我输入url mydomain.outserver.cz,我会看到“它工作!”

只有纯ftpd用户没有创建


怎么了?非常感谢

请检查并共享命令的日志
pure pw useradd“$1”-u ftpuser-d”/var/www/$1”-m
,如果它可以正确执行,这似乎是一个问题。感谢您的回答。原木看起来很粗糙。shell脚本(文件:log.txt)中的所有行。正在写入密码正在写入密码2。。。在log php($output variable):没有bug。
exec("bash '/var/www/webscript.sh' 'mydomain' '123456'", $output);
/var/www/
  -  webscript.sh
  -  passfile (two same rows with password for pure-pw useradd in out of script is deleted)
  -  fei-ispwe-5 (domain directory)
      - sourcecode of main page
  -  other directory, created by webscript.sh for Dyn. vhost
      - index.html (generated from webscript.sh)