Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004

    Question Anyone can give me httpd.conf in a cpanel dedicated?

    I am trying to learn how cpanel handle dynamic virtual hosts.

    From Apache help file, there are only two ways to do it: mod_vhost_alias and mod_rewrite for this purpose. However, both are best used in a single user system /home/www/

    Also setting up userid and usergroup are difficult in both cases.

    I want to learn if Cpanel does apacheclt graceful every time a new domain is added, and how it inserts userid and groupid to each <virtualhost >, because neither mod_vhost_alias nor mod_rewirte can add those values.

    In 1and1's shared enviroment, it uses one httpd.conf in each user's home directory.

    RewriteEngine on

    RewriteMap host2filename prg:/usr/local/apache/share/cgi-bin/
    RewriteLock /var/lock/rewrite.lock

    It seems it uses a perl program to write dynamic vhost names.

    I wonder if cpanel uses the same mothod.

    Can anyone give me the defualt httpd.conf in cpanel?

  2. #2
    The best is, YES make your own mod, or script.
    I dont think there is a unique way to make dynamic vhosting, everybody needs it for his own purphoses.
    Mod_rewrite is a good solution (IMHO), but it also has problems. Eg: Apache 1 and 2.
    More info about what you need it for, would be nice

  3. #3
    Join Date
    Aug 2004
    Collecting Domain Name and IP....
    User: affordab
    Killing all processes owned by user...Done
    Cleaning passwd,shadow,group....Done
    Removing User from Group....Done
    Removing Domlogs...Done
    Removing crontab...Done
    Removed Extra Entries from httpd.conf
    Removed Entry from httpd.conf
    Removed Entry from proftpd.conf
    Removing User....Done
    Removing Group....Done
    Removing Named -> deleted from oberon.
    Removing mailman lists...
    Removing mysql Databases....
    Removing localdomains entires....Done
    Adding ip back to ipaddrpool....Done
    Removing Control Panel file....Done
    Removing Stats Run Information....Done
    Removing Proftpd File....Done

    send to CONTACTEMAIL (3) [3]
    Ftp Password Files synced
    Vhost Passwords synced -> deleted from oberon.

  4. #4
    Join Date
    Aug 2004
    WWWAcct 9.2 (c) 1997-2004 cPanel, Inc.

    | New Account Info |
    | Domain:
    | Ip: (n)
    | HasCgi: y
    | UserName: affordab
    | PassWord:
    | CpanelMod: x
    | HomeRoot: /home
    | Quota: 20 Meg
    | NameServer1:
    | NameServer2:
    | NameServer3:
    | NameServer4:
    | Contact Email: [email protected]
    User affordab added
    Changing password for affordab
    Password for affordab has been changed
    Removing Shell Access (n)
    Changing shell for affordab.
    Shell changed.
    Copying skel files from /home/leon/cpanel3-skel/ to /home/affordab/
    Using redhat 7.1/mdk 8.0
    Using new quota support
    (uid 322 20480 20480 ):
    Filesystem blocks soft hard inodes soft hard
    /dev/md3 8 20480 20480 2 0 0
    /dev/md5 0 20480 20480 0 0 0
    /dev/md4 0 20480 20480 1 0 0
    /dev/md0 0 20480 20480 0 0 0
    Name Virtual Host already exists
    Added Entries to httpd.conf (noip)
    Bind reconfiguring on oberon using rndc
    Added Named File
    Restarting apache
    Ftp Password Files synced
    send to CONTACTEMAIL (3) [3]
    Vhost Passwords synced
    wwwacct creation finished
    Account Creation Complete!!!

  5. #5
    Join Date
    Aug 2004
    Looks like they change httpd.conf and
    restart apache every time a new host is added.

    Looking at xpanel's httpd.conf:

    #----------> Apache Configuration for XPanel <---------------------------------#
    UseCanonicalName Off
    RewriteEngine On
    RewriteMap lowercase int:tolower
    RewriteCond %{REQUEST_URI} !^/cgi-bin/
    RewriteCond %{REQUEST_URI} !^/insert/
    RewriteRule ^/(.*)$ /home/vhosts/${lowercase:%{SERVER_NAME}}/$1
    RewriteCond %{REQUEST_URI} ^/cgi-bin/
    RewriteRule ^/(.*)$ /home/vhosts/${lowercase:%{SERVER_NAME}}/$1 [T=application/x-httpd-cgi]
    RewriteCond %{REQUEST_URI} ^/insert/
    RewriteRule ^/(.*)$ /usr/local/xpanel/$1 [T=application/x-httpd-cgi]
    CustomLog "|mysql -hlocalhost -uxpanel -pXPanel XPanel" mysql
    LogFormat "UPDATE users SET bandwidthUsed=bandwidthUsed+%B WHERE domainName='%{Host}i';" mysql
    <Directory "/home/vhosts/">
    AllowOverride FileInfo
    Options FollowSymLinks ExecCGI
    ErrorDocument 404
    <Directory "/usr/local/xpanel/insert/">
    Options FollowSymLinks ExecCGI
    <Directory "/var/www/cgi-bin/xpanel_admin">
    AllowOverride All
    #----------> End Apache Configuration for XPanel <-----------------------------#

    But this one does not set a user/group for each host run apache

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts