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

Howto insert Alias into httpd.include automatically

Discussion in 'Plesk 11.x for Linux' started by xplod, Aug 14, 2012.

  1. xplod

    xplod New Pleskian

    22
    73%
    Joined:
    Feb 25, 2008
    Messages:
    11
    Likes Received:
    0
    Actually, I have to insert the line

    Alias /Microsoft-Server-ActiveSync {DOCROOT}/z-push/index.php
    anytime, I change the server configuration.

    I tried to add it in the servers hostings settings for PHP, but this didn't work.
    Is there any other way to insert this line for just a single subdomain, instead of editing the template?

    Best regards,
    Dirk
     
  2. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    Am not sure there's but you can LOCK your httpd.include file from it changing when you make changes on the server configuration.

    That can be done by:

    chattr +i httpd.include

    and if you need to UNLOCK it, then

    chattr -i httpd.include
     
  3. Sergey L

    Sergey L Golden Pleskian Staff Member

    32
    43%
    Joined:
    Aug 10, 2006
    Messages:
    1,195
    Likes Received:
    30
    Would /var/www/vhosts/sub.domain.com/conf/vhost.conf maybe work for you?
     
  4. xplod

    xplod New Pleskian

    22
    73%
    Joined:
    Feb 25, 2008
    Messages:
    11
    Likes Received:
    0
    You didn't get what I meant to ask:

    I do not want to edit the .conf file anytime Plesk updates the specific subdomain (I didn't notice a config update the last time plesk did an autoupdate, so that the ActiveSync service was down a few hours)

    My current solution is to edit the template in the templates/custom directory, so that the alias is created for every domain and subdomain, but that's not my favourite one...
     
  5. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    Xplod, Sergey's solution keeps the file un-changed with or without plesk making configurations after the new subdomain creation.

    So does mine (though a-bit dirty)
     
Loading...