ISPconfig + Apache

Discussion in 'Server Operation' started by LeoLinux, Jul 23, 2009.

  1. LeoLinux

    LeoLinux New Member

    Hi Falko / and all the others,

    my questions are pretty simple:

    a) How does monthly http / eMail traffic counting work? Since Quoata doesn't tell me anything about used <Traffic> only about used <DiskSapce>. Do you use apache User's access.log for that?

    b) How do you manage to add/modify/remove Virtual Hosts in the Apache conf with the help of ISPconfigs Webinterface? Do you use "sed"? It would be nice if I could get an example of how to add/modify/remove a single Virtual Host in the config.


    Thanks,

    Leander
     
  2. id10t

    id10t Member

    For B if all settings, etc. are stored in a database its a simple matter of adding/removing record (or flagging as removed) and then dump it all out to the file, replacing the file each time.
     
  3. LeoLinux

    LeoLinux New Member

    This SQL soluten makes sences, but to be honest it doesn't sound like a nice way how to put it into a script. I thought more of something like sed, but I could give it a try if you would have me an example of how and with what commands you do the mentioned SQL solution.

    Thanks,

    Leander
     
  4. LeoLinux

    LeoLinux New Member

    ... thought about that idea of always replacing the whole vhosts.conf ... but I'm still not the best friend of this database solution ... it just locks like to much effort ...

    Therefore I found a script which is originally responsible for a awstat conf creation ...

    ###############
    # Create the virtual host awstats.conf
    cat /etc/awstats/awstats.model.conf | \
    sed -e "s/\\\$DOMAIN/$DOMAIN/g" | \
    sed -e "s/\\\$USERNAME/$WUSERNAME/g" | \
    sed -e "s/\\\$ALIASES/$ALIASES/g" > \
    "/etc/awstats/awstats.$DOMAIN.conf"
    ###############

    Think I'll try do modify that somehow ...

    But I'm still open to OTHER solutions - Please share your ideas! ;)


    AND still ... what about TRAFFIC CALCULATION ... where to get the Data from how much Apache used? The Apache access.log? Any other ideas?
    Please share ideas ... - anything helpful is wanted ;))


    Best regards,

    Leander
     
  5. LeoLinux

    LeoLinux New Member

    Is there no way to put the vhosts.conf part in a SQL Table and make Apache read the information out of this table?
     
  6. falko

    falko Super Moderator

    No. I think there once was a project that tried to build such an Apache module, but I guess it's dead...
     

Share This Page