Join the community today
Become a Member

Adding the joomla rewriting rule to vhost template

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Alex12, Nov 21, 2018.

  1. Alex12

    Alex12 New Member

    4
    0
    1
    Nov 21, 2018
    Ratings:
    +1
    Local Time:
    2:57 PM
    latest
    10.3
    I need to create many, many Joomla vHosts.

    For that reason it make sense to add the necessary rewriting rule in the vhost conf template which is used to create a vhost. Well, at least it's my idea;)


    So, I opened

    nano /usr/local/src/centminmod/inc/nginx_addvhost.inc

    and added this line

    #joomla
    try_files $uri $uri/ /index.php;

    in 3 different sections.


    Afterwards, I entered the command

    while read -r d s f; do echo "nv -d $d -s $s"; nv -d $d -s $s; done < test2.txt

    ## my test2.txt ##
    domain1.com yd
    domain2.com yd
    #####

    My questions:

    #1
    Both domains have been created.
    I checked domain1/domain2 conf - no joomla entry

    Is there another file to make these changes?

    #2
    autoprotect.sh
    During the creation of a vhost, autoprotect.sh is running: it creates a new autoprotect.conf for a new vhost (which is fine) but it also checks every other vhost. This takes a lot of time.

    How can I disable this checking process for all vhosts?


    Thanks guys. Help is much apprechiated.





    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: i.e. 1.15.6
    • PHP Version Installed: 7.1.23
     
  2. eva2000

    eva2000 Administrator Staff Member

    37,227
    8,133
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,521
    Local Time:
    4:57 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    I would edit the nginx vhost templete to comment out the include file for autoprotect or just disable cronjob for it so autoprotect include files never get populated - 1st entry below comment it out with hash in front for cronjob edited via crontab -e
    Code (Text):
    crontab -l
    13 23 * * * /usr/local/src/centminmod/tools/autoprotect.sh >/dev/null 2>&1
    0 */4 * * * /usr/bin/cminfo_updater 2>/dev/null
    35 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
    


    As to editing default nginx vhost, check out a newly added guide I wrote in Centmin Mod Insights forum at here
     
  3. Alex12

    Alex12 New Member

    4
    0
    1
    Nov 21, 2018
    Ratings:
    +1
    Local Time:
    2:57 PM
    latest
    10.3
    Thanks for the information ... just created 1.000 vHosts in 3h ;)
     
  4. eva2000

    eva2000 Administrator Staff Member

    37,227
    8,133
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,521
    Local Time:
    4:57 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    1,000 nginx vhosts on same single server ??? dam that's ALOT ! Imagine trying to add that many vhosts via a graphical GUI interface one vhost at a time LOL
     
    Last edited: Nov 22, 2018
  5. Alex12

    Alex12 New Member

    4
    0
    1
    Nov 21, 2018
    Ratings:
    +1
    Local Time:
    2:57 PM
    latest
    10.3
    Quick info about the setup:

    SSL gateway -> LB/Proxy -> app servers centmin 1,2,3,... -> LB/Proxy -> DB cluster
     
    • Informative Informative x 1
  6. eva2000

    eva2000 Administrator Staff Member

    37,227
    8,133
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,521
    Local Time:
    4:57 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    ah so there's more than one centmin mod server for those 1,000 nginx vhosts and not a single server !

    that's alot of SSL certificates then too!
     
..