httpd.include NOT modified when vhost.conf changed !

Discussion in 'Parallels Plesk Panel for Linux - 8.x and Older' started by kadoudal, Nov 23, 2007.

  1. kadoudal

    kadoudal New Member

    Messages:
    244
    I have a subdomain svn.aelmat.com, the virtual host is defined in :
    /var/www/vhosts/aelmat.net/subdomains/svn/conf/vhost.conf

    as follows :

    NameVirtualHost *:80

    <VirtualHost *:80>
    ServerName svn.aelmat.net

    ServerAdmin myselfr@mac.com

    <Directory /var/lib/svn/aelmat>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None

    Order allow,deny
    allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.svn.aelmat.net.log
    CustomLog /var/log/apache2/access.svn.aelmat.net.log combined

    <Location /svn>
    DAV svn
    SVNPath /var/svn/aelmat

    # Access control policy
    AuthzSVNAccessFile /etc/apache2/aelmat_svn_access.rules

    # only authenticated users may access the repository
    Require valid-user

    AuthType Basic
    AuthName "Ael Mat Subversion repository"
    AuthUserFile /etc/apache2/dav_aelmat_svn.passwd
    <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
    </LimitExcept>
    </Location>

    </VirtualHost>

    I run the command :
    /usr/local/psa/admin/bin/websrvmng -r --vhost-name=svn
    and restart Apache
    /etc/init.d/apache2 restart

    BUT

    /var/www/vhosts/aelmat.net/conf/httpd.include

    is NOT modified

    <VirtualHost 88.191.202.39:80>
    ServerName svn.aelmat.net:80
    SuexecUserGroup sybille psacln
    ServerAdmin "theadmin@aelmat.com"
    DocumentRoot /var/www/vhosts/aelmat.net/subdomains/svn/httpdocs
    CustomLog /var/www/vhosts/aelmat.net/statistics/logs/access_log plesklog
    ErrorLog /var/www/vhosts/aelmat.net/statistics/logs/error_log
    ScriptAlias /cgi-bin/ /var/www/vhosts/aelmat.net/subdomains/svn/cgi-bin/
    <IfModule mod_ssl.c>
    SSLEngine off
    </IfModule>
    <Directory /var/www/vhosts/aelmat.net/subdomains/svn/httpdocs>

    why the modification is not performed by Plesk ???

    thansk for your lights ...
  2. mariusc

    mariusc New Member

    Messages:
    11
    It seems right... u have the subdomain defined there... I have tried to setup manualy a subdomain ip, and works only till i add a new subdomain. Then, the httpd.include will automatically modify the ips.
  3. kadoudal

    kadoudal New Member

    Messages:
    244
    That's why I worry about..

    it seems right.. but the httpd.include is created/updated only when I create/delete subdomains

    It get never modified when I insert a virtual host definition in the subdomain vhost.conf ... then the httpd.include is not modified.....

    seems none is using virtual hosts with Plesk ???
  4. mariusc

    mariusc New Member

    Messages:
    11
    Depends on what httpd.include are u looking.
    For example, the httpd.include for domain macosoft.ro on my server (suse 10.0 with plesk 8.2) is on /srv/www/vhosts/macosoft.ro/conf/httpd.include
  5. kadoudal

    kadoudal New Member

    Messages:
    244
    yes, this is the equivalent http.include file on my Debian server....

    I am close to get rid of my Plesk licence this month, and reinstall my box without it... as it doesn't run at it should and (even more) as they write in their manual !!!

    Support from Plesk cost a fortune...so I am giving up
  6. ziba@

    ziba@ New Member

    Messages:
    162
    Hi,

    Yes, "Include vhost.conf" directive is not being added to http.include autmatically. To rebuild all your httpd.include files you should run the following command:
    PLESK_PRODUCT_ROOT_DIR/admin/bin/websrvmng -v -a

    This command will rebuild httpd.include for all domains (it can also be used to rebuild configuration for a specific domain, use it with --help option to get more info) and will restart apache so that changes in configuration would take place.
    When you run this command it also checks if there is vhost.conf in directory with httpd.include for every domain. If there is vhost.conf it will place "Include vhost.conf" in httpd.include.

    I guess you should use SWsoft knowledgebase a little more.
    Searching by keyword vhost.conf I found several articles which explain how this works:
    http://kb.swsoft.com/en/432
    http://kb.swsoft.com/en/437

    And in one of them I even found a link to Plesk admninistrator guide chapter with brief explanation of how this should be done:
    http://download1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-administrators-guide/17359.htm

    You should give a try to reviewing documentation and searching knowledge base in case of any problems rather than giving up so fast ;)
  7. kadoudal

    kadoudal New Member

    Messages:
    244
    You wrote, and you're right...
    but I mentionned in my post :


    so that's why I worry about it....
    I also tried /usr/local/psa/admin/bin/websrvmng -v -a

    but the svn vhost.conf modification were not put into the http.include...

    so, the problem is somewhere else...
    if the vhost.conf for the subdomain svn was wrong.... apache will get angry...
    so it's not even read...

    you're right, the doc is ok ( I read it...) but the behaviour is not as it is written..

    btw did you ever wrote a subdomain vhost.conf I could use as a template ?
    maybe mine are wrongly written... the one in my previous post

    I did not give up actually.. I was upset
    ;)
  8. breun

    breun Product Expert

    Messages:
    1,651
    The contents of vhost.conf are not actually put into the httpd.include, httpd.include should just have a line that includes the contents, for instance:

    Code:
    Include /var/www/vhosts/example.com/conf/vhost.conf
    The websrvmng command should append this line into the httpd.include file. That's all.
  9. kadoudal

    kadoudal New Member

    Messages:
    244
    thanks

    I found this line working on a small example_app .. it's working

    I'll try again with my app
  10. breun

    breun Product Expert

    Messages:
    1,651
    Note that you shouldn't need to add that line to the httpd.include file yourself, running /usr/local/psa/admin/bin/websrvmng -a -v (or the equivalent for just the domains you created a vhost.conf file for) should take care of that.
  11. mariusc

    mariusc New Member

    Messages:
    11
    Can't make subdomains with different IPs

    How can i set a subdomain on my server and to set a different IP? (not that the website have).

    On same machine I run cstrike servers, and I have other IP's for that. So, I need subdomains for ranking, and there I need the ips of respective servers, hosted on same machine.

    Any ideea?
  12. breun

    breun Product Expert

    Messages:
    1,651
    You can create a new domain and use the full subdomain as the domainname, then you can run that on a different IP. Or if the hosting for that subdomain is on another machine you can just add an A record for that subdomain and point that to the other machine's IP address.

Share This Page