View Full Version : question from a CPanel newbie
Tazzman 07-07-2002, 01:32 PM Is is possible to set up subdomains in the form name.bla.com in CPanel and then give that subdomain access to the panel and also set diskspace and bandwidth for it. It was possible in Ensim but not I have ad CPanel installed I can't seem to find this feature anywhere.
I had a few sites hosted in this form under Ensim, would be a shame to have to give them a subdomain without panel access or make them get their own domain name...
SoftWareRevue 07-07-2002, 01:39 PM If you do it through WHM. Not sure if you can do it just with cPanel.
Tazzman 07-07-2002, 02:21 PM yes, I'm the system admin, so I have WHM access. Only when I tried just setting up a domain with name.bla.com it didn't show (yes nameservers and DNS entries are right and have propagated. Everything works fine if I just enter domain.com).
SoftWareRevue 07-07-2002, 02:29 PM Maybe you don't have sub-domains enabled for the account?
Andrew 07-07-2002, 02:31 PM Yes, you should be able to do that from WHM. You just have to make sure subdomains are enabled for that account. :)
<edit> whoops too slow! someone got there first! :) </edit>
Tazzman 07-07-2002, 02:34 PM Nono, I can create subdomains for an account, only if you do it from an account in CPanel you can't set transfer and diskspace limits for the accounts and also the subdomain owner does have CPanel access.
Also another problem:
go to www.animreview.com and click on the enter button.
It prompts me to download the main.php page instead of showing it. Any idea what going on there? Almost like it doesn't recognize PHP as a valid web extension (like htm etc.) and treats it as a data file (well, you know what I'm trying to say).
I didn't install CPanel myself, so I don't know how they set it up and I am now regretting this. PHP seems to be installed (4.0.6). Also, with CPanel, can I just grab the latest version of say php and install it via SSH, or will that influence CPanel?
isildur 07-08-2002, 12:07 AM You mean, your subdomains (SUBDOMAIN.rootdomain.com) are supposed to have unique cpanel access for end users as well? That's news to me.
I have never once seen that particular functionality within the cpanel software. I'm assuming it is new or did someone interpret something incorrectly? Or I have been living in a parallel dimension.
Also, if you've got php 4.0.6, its definitely time to upgrade. Darkorb (cpanel producers) provide up-to-date and secure Apache builds that include PHP and a variety of other options. Check out http://cpanel.net for more details. (esp. "downloads")
You'll want to get php updated asap, and your apache updated to 1.3.26 if you want to protect your box from all of the latest exploits........ especially that nasty Apache one released in early/mid June.
myros 07-08-2002, 01:44 AM You can do this by first creating the sbdomain in WHM "add new account" and enter the full subdomain name for the new account.
I did this for my demo cpanel.
In WHM add new account demo.domain.com
That gives it full access, ftp, its own cpanel etc ... of course I turned on 'demo mode' for it but you could skip that for a real domain.
Check the cpanel forums just in case I got a detail wrong, been a while :)
Myros
(made a slight error in the process, fixed now)
Studio64 07-08-2002, 03:13 AM PHP is obviously not installed correctly b/c main.php isn't even being parsed as a PHP file.
Pull that site offline quickly...
If you have any database calls in your site your p/w's are exposed....
if php is installed perhaps your missing the AddType statment in httpd.conf , thus why its being offered as a download by apache.
If this is not present in httpd.conf try adding it:
AddType application/x-httpd-php .php .php4 .php3
Jedito 07-08-2002, 03:40 AM If you ran buildapache.sea and started to get the PHP problem,
killall -9 httpd
comment the lines with AddModules in httpd.conf and start apache.
Tazzman 07-08-2002, 05:26 AM Well, I've installed all the CPanel updates, but still no go :(
The httpd.conf file is attached, but the php extension seem to be properly parsed...
Jedito 07-08-2002, 05:43 AM You don't have this lines
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
On your httpd.conf. for what I saw, add them in
LoadModule rewrite_module libexec/mod_rewrite.so
LoadModule bwlimited_module libexec/mod_bwlimited.so
LoadModule bytes_log_module libexec/mod_log_bytes.so
LoadModule php4_module libexec/libphp4.so
.
.
.
.
AddModule mod_setenvif.c
<IfDefine SSL>
AddModule mod_ssl.c
</IfDefine>
AddModule mod_frontpage.c
AddModule mod_bwlimited.c
AddModule mod_log_bytes.c
AddModule mod_php4.c
Tazzman 07-08-2002, 05:44 AM I was just going to post this and say it suggested php wasn't even running. You beat me to it:
The site www.animreview.com is running Apache/1.3.26 (Unix) mod_log_bytes/0.3 mod_bwlimited/1.0 FrontPage/5.0.2.2510 mod_ssl/2.8.9 OpenSSL/0.9.6b on Linux
Edited to:
LoadModule rewrite_module libexec/mod_rewrite.so
LoadModule bwlimited_module libexec/mod_bwlimited.so
LoadModule bytes_log_module libexec/mod_log_bytes.so
LoadModule php4_module libexec/libphp4.so
# Reconstruction of the complete module list from all available modules
# (static and shared ones) to achieve correct module execution order.
# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c
AddModule mod_setenvif.c
<IfDefine SSL>
AddModule mod_ssl.c
</IfDefine>
AddModule mod_frontpage.c
LoadModule php4_module usr/libphp4.so
AddModule mod_bwlimited.c
AddModule mod_log_bytes.c
AddModule mod_php4.c
SSH result:
Last login: Mon Jul 8 05:01:23 2002 from kbl-vlis8107.zeelandnet.nl
root@core [~]# httpd restart
/usr/sbin/httpd restart: configuration broken, ignoring restart
/usr/sbin/httpd restart: (run 'apachectl configtest' for details)
root@core [~]# locate php4lib.so
root@core [~]# locate mod_php4
/home/installd/buildapache/php-4.2.1/sapi/apache/mod_php4.c
/home/installd/buildapache/php-4.2.1/sapi/apache/mod_php4.exp
/home/installd/buildapache/php-4.2.1/sapi/apache/mod_php4.h
root@core [~]#
lib php4.so is located in /usr/lib/apache, but when using the locate command it doesn't seem to find it.
I have now tried this:
LoadModule php4_module l/usr/bin/libphp4.so
As there is no libphp4.so in de libexec folder. Apache did restart when using this only the sites on the server were knocked offline:
root@core [~]# httpd restart
/usr/sbin/httpd restart: httpd not running, trying to start
[Mon Jul 8 05:50:45 2002] [warn] NameVirtualHost 66.28.242.106:80 has no VirtualHosts
[Mon Jul 8 05:50:45 2002] [warn] NameVirtualHost 66.28.242.106:80 has no VirtualHosts
/usr/sbin/httpd restart: httpd started
MotleyFool 07-08-2002, 06:30 AM If you rebuild php from tarball
./configure --whatever you want
make
apachectl stop
make install
apachectl start
then the Loadmodule line will be automatically inserted in httpd.conf
Change that to this:
LoadModule rewrite_module libexec/mod_rewrite.so
LoadModule bwlimited_module libexec/mod_bwlimited.so
LoadModule bytes_log_module libexec/mod_log_bytes.so
LoadModule php4_module libexec/libphp4.so
# Reconstruction of the complete module list from all available modules
# (static and shared ones) to achieve correct module execution order.
# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c
AddModule mod_setenvif.c
<IfDefine SSL>
AddModule mod_ssl.c
</IfDefine>
AddModule mod_frontpage.c
AddModule mod_bwlimited.c
AddModule mod_log_bytes.c
AddModule mod_php4.c
Tazzman 07-08-2002, 07:38 AM Well, I've now forced a php reinstall using the redhat 7.3 rpm, still no go though, but I'll fiddle some more later. Thanks for your overwhelming response :)
Jedito 07-08-2002, 07:49 AM Try this
Download a fresh copy of PHP at php.net
untar it.
cd to phpfolder
./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-bcmath --enable-calendar --with-mysql --with-gd=/usr --with-freetype --enable-track-vars --with-jpeg-dir=/usr --enable-trans-sid --enable-ftp --with-png-dir=/usr --enable-sockets --with-mcrypt --with-openssl=/usr --with-sysvshm --with-sysvsem --enable-i18n -enable-safe-mode --enable-mbregex --with-imap --with-ming --with-curl=/usr/local --with-kerberos=/usr/kerberos --with-zlib --with-ttf
(you may change some path)
make
make install
That should solve the problem.
MotleyFool 07-08-2002, 08:37 AM CMIIW
A small correction to Jorge's post.
make
apachectl stop
make install
apachectl start
If you are adding --with-imap you may need cclient libraries from Washington Uni site
Good luck
Balaji
Tazzman 07-08-2002, 02:31 PM Thank you for your time and help. Followed the instructions of the last 2 posters and it worked a dream. Php is back to it old self again :)
Consider this thread closed...
Jedito 07-08-2002, 03:24 PM Hi Motley
But Cpanel already comes with imap installed as default, that's a normal ./configure line for PHP on Cpanel configuration.
There were some things that he has to change, like the path to GD or jpeg that I have installed in non defaults folders.
MotleyFool 07-09-2002, 04:18 AM Hi Jorge,
Thanks for that piece of info! :)
You rock!
Cheers
Balaji
|