1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

vhost.conf question on how-to

Discussion in 'Plesk for Linux - 8.x and Older' started by chrisl@, Sep 25, 2006.

  1. chrisl@

    chrisl@ Guest

    0
     
    In the httpd.include file you have the following statement:

    Code:
    # ATTENTION!
    # DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
    # FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
    # MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
    # FOLLOWING FILE(S):
    # /var/www/vhosts/xxxxx.com/conf/vhost.conf
    # /var/www/vhosts/xxxxx.com/conf/vhost_ssl.conf
    # /var/www/vhosts/xxxxx.com/subdomains/<subdomain-name>/conf/vhost.conf
    
    The file does not exists by default. When I create the file they suggest it does not get loaded. Where does this file get loaded from? I can't find any include statements anywhere that would laod this file. If I need to modify a file to get this new conf file included doesn't that break the requirement of not modify the original file? Any ideas or help? I need to setup some custom redirects for a site and would like to automate this via a script.

    -chrisl
     
  2. jwdick

    jwdick Guest

    0
     
    After you create the vhost.conf file, run:

    /usr/local/psa/admin/sbin/websrvmng -a -v

    This will place the include statement with the httpd.conf file and Plesk will not remove it the next time the conf file is updated.
     
  3. chrisl@

    chrisl@ Guest

    0
     
    Thanks worked great!

    -chrisl
     
  4. Whistler

    Whistler Guest

    0
     
    I suggest using:

    Code:
    <path_to_Plesk_admin_bins>/websrvmng --vhost-name=<the_host_your_reconfiguring> -r
    
    As this will not leap though all hosts creating new configuration files for all hosts but only for the host you have changed.

    The -r will restart Apache.
     
  5. chrisl@

    chrisl@ Guest

    0
     
    Even better! Thanks. Still learning lots about Plesk.
     
  6. kencl

    kencl Guest

    0
     
    great thread! Is websrvmng documented anywhere? eg will "websrvmng -help" get me started or...?

    I'm trying to figure out what I can and cannot configure manually without interfering with Plesk or having it overwrite my changes.

    I'm from the old school of administering via httpd.conf and friends, but I don't have a choice in this case, so I have to learn to work with Plesk rather than fight it. And these Plesk help files, sheesh. "If you want to enable Mystery Feature, put a checkmark in the checkbox and click the OK button - good luck..."

    ... and managers wonder why things take so long when they insist on adding a layer of complexity in the name of simplification...
     
  7. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Note that this is all in the Plesk 8 Administrator manual: Appendix A. Advanced Features -> Including Directives into Web Server Configuration File. This section tells you about httpd.include, vhost.conf and the websrvmng command.
     
  8. kencl

    kencl Guest

    0
     
    I don't know if we are talking about the same Plesk 8 help files, but if we are, mine are very incomplete:

    1) It doesn't tell you anything about the websrvmng switches.

    2) It doesn't tell you how to test your new configuration file(s) before restarting apache, which normally you do with apachectl -t.

    3) It doesn't tell you what happens when your directives conflict with those generated by Plesk.

    4) It doesn't tell you if your vhosts.conf or vhosts_ssl.conf is required to become a complete replacement for a given VirtualHost directive, or just augment it.

    5) It doesn't tell you how to unload your vhosts.conf directives.

    ...
     
Loading...