Custom entry in apache vhost

Discussion in 'Installation/Configuration' started by grungy, Jan 18, 2010.

  1. grungy

    grungy Member

    I need to enter custom stuff in an apache vhost config file....and need it to stay there. As you know ispconfig willr emove all custom modifications later on.

    How can I do this?
     
  2. Mr. Print

    Mr. Print New Member

    I have the same problem due to special actions for two web sites, hopefully there is a way where the information for a virtual host will not get over written. I thoutht there was a place for special directives in ISPConfig, but have not found as of yet.
     
  3. aurasdoom

    aurasdoom New Member

    You can modify the vhost template if you want for every site:
    /usr/lib (i think) /ispconfig3/server/conf/vhost.conf.master

    Off the top of my head, because my server is offline right now, go to Websites -> click on the website -> And in the last tab above the website details you find the custom apache directives.
     
    Last edited: Jan 19, 2010
  4. Mr. Print

    Mr. Print New Member

    aurasdoom, Really appreciate the reply. I'm using ISPConfig 2., However I found the vhost.conf.master
    /root/ispconfig/

    One more question. I have two web sites that run cgi scripts and Coldfusion in the web directory (I'm aware of the security issue, I didn't create the site) Where in this file would I add my changes such
    <directory
    my directive permissions
    <directory
    Here is my master
    {FP_RESOURCE_CONFIG}
    {FP_ACCESS_CONFIG}
    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #

    {SERVERIP}

    #
    #


    ######################################
    # Vhost: {SERVERNAME}
    ######################################
    #
    #
    <VirtualHost {IP}>
    {HTTPD_INCLUDE}
    {SUEXEC}
    ServerName {SERVERNAME}
    ServerAdmin {SERVERADMIN}
    DocumentRoot {DOCUMENTROOT}
    {SERVERALIAS}
    {DIRECTORYINDEX}
    {CGI}
    ErrorLog {WEB_ERROR_LOG}
    {PHP}
    {RUBY}
    {PYTHON}
    {SSI}
    {WAP}
    {STATSALIAS}
    {ERRORALIAS}
    {ERROR}
    AliasMatch ^/~([^/]+)(/(.*))? {HTTPD_ROOT}/{WEB}/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? {HTTPD_ROOT}/{WEB}/user/$1/web/$3
    {REWRITE_RULE}
    {FRONTPAGE}
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    {WEBDAV}
    </VirtualHost>
    #
    {SSL}

    Thanks again for your reply
     
  5. grungy

    grungy Member

    I know I can enter apache directives via ispconfig 3, but that does not always work. The problem occures if you already have something in the vhost conf file and need to modify it.

    I also modified the apache template but this does not help because I need specific conf file per site.

    For example I already have following in all of my apache vhosts:

    <IfModule mpm_itk_module>
    AssignUserId web11 client7
    </IfModule>


    but I need to have:

    <IfModule mpm_itk_module>
    AssignUserId web11 client7
    MaxClientsVHost 50
    </IfModule>



    or

    <IfModule mpm_itk_module>
    AssignUserId web11 client7
    MaxClientsVHost 100
    </IfModule>

    depending on the site usage etc...
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Just add it in the apache directives field of the website in ispconfig and click on save. Or you modify the vhost maetr template.
     
  7. grungy

    grungy Member

    I can not use master template cuz I need specific settings per site.

    If I add it via ispconfig other vhosts get messed up, I reported the bug. Any other way?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no such bug. All data that you enter in the apache directives field is copied exactly to the vhost. You just mixed up the order of your code as you modified the master template. If you want to override a setting from apache directieves field, the code in the master.cf that shall be overridden has to be before the place where the apache directives code is included.
     
  9. Mr. Print

    Mr. Print New Member

    grungy,

    I have solved the problem with special directory in conf (vhost) in your ISP Control Panel where settings are for web site you will see Apache Directives enter any special website specific directives within there and save. They will work for that specfic site only. Be very careful that your directive is correct. It will appear in Vhost_isponfig.conf at the beginning of the web site.

    I hope this helps and is clear.
     

Share This Page