apache - Create Addon Domains from PHP -
i have vps (centos) cpanel , suphp enabled. apache/2.0.63 (unix) mod_ssl/2.0.63 openssl/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 frontpage/5.0.2.2635 mod_fcgid/2.3.5
as root created account , set domain it. can login account's cpanel , create addon domains. project want allow visitors of website same thing (create addon domains) php script.
i guess it's impossible php only, since requires changing config files php has no right , don't know if it's possible obtain necessary privileges php process. suspect have create command file , use system() or similar php function call it. again i'm not sure how give command file enough rights. maybe there can user switch commands , necessary stuff change config files... please advise.
thank you.
you need add dns entry point *.yourdomain.com
application , application should handle page show based on value of $_server['http_host']
. build system lets end-users create accounts, guess have add column database hold subdomain chose, , show appropriate page.
i'm not sure if cpanel lets add wildcard dns entries. you'd have contact hosting provider that.
Comments
Post a Comment