Learn about Centmin Mod LEMP Stack today
Become a Member

Vanilla Vanilla Forums 2.5.1+ vhost Configuration

Discussion in 'Forum software usage' started by Jimmy, Mar 26, 2018.

  1. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    Sounds good. Was just curious thought maybe adding it to the php.conf wouldn't hurt anything.

    I'm just going to put the X_ in the php.conf and be done with it. I'll make a note on the vhost conf file on github.

     
    Last edited: Mar 27, 2018
  2. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    From what I can gather now is that if you check the box in install setup that says do no require htaccess, then maybe the conf/config.php entry for $Configuration['Garden']['RewriteUrls'] = true;" is removed ? Did you check that box too ? And if left unchecked, $Configuration['Garden']['RewriteUrls'] = true;" maybe set in conf/config.php.

    Then it comes down to nginx rewrite rules. My own listed nginx rules worked as when $Configuration['Garden']['RewriteUrls'] = true;" set in conf/config.php.
     
  3. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    I did check the box and it is not present by default in the /conf/config-defaults.php file (pre-install file).

    It appears to only be added manually. Though, I can test this when I install again.

    For the rewrite rules I just used what is in their docs w/ my default cmm vhost setup. Everything works great - w/ the addition of the line in the php.conf
     
  4. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    Thinking about it, it's not present in the config.php file post install. I know this because I didn't know anything about it until you mentioned it. When you mentioned it I had to add it to my conf file. Since I had to add it, it wasn't present post install w/ the don't need htaccess checked.
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Well i think config method is basically same as setting X_REWRITE 1 from code at
    PHP:
            if ($rewrite === null) {
                
    // Garden.RewriteUrls is maintained for compatibility but X_REWRITE is what really need to be used.
                
    $rewrite val('X_REWRITE'$_SERVERc('Garden.RewriteUrls'true));
            }
    ?

    Here's my Vanilla Centmin Mod Nginx config gist posted code - it's provided as is without any support from me, so consume it at your discretion first time vanilla 2.5.1 forums + centmin mod 123.09beta01 nginx 1.13.10 + php-fpm 7.1.15 + mariadb 10.1.31 + csf firewall + centos 7.4 on 2GB OpenVZ 2cpu E5-1650v3 VPS :D
     
  6. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    Those are some nice times w/ the cache on.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah indeed.. no idea how they hold up to production usage though i.e. if any issues and you don't want to be using default global /usr/local/nginx/conf/php.conf include file for fastcgi_cache as it affects any other nginx vhost site on your server hence why i suggest making a copy. But fastcgi_cache for PHP-FPM is only for Vanilla guest users based on cookie detection. So logged in members only will have non-fastcgi_cache based PHP-FPM.
     
  8. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    I'm going to be running my vanilla's on a separate server, so it can be customized for vanilla installs. :)

    One thing that just occurred to me, when you install a vhost in CMM and at the end it lists the lines you need to use to delete the vhost, you need to add the pre-static-local-domain.com.conf files to that list - I don't believe those are listed.
     
  9. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah yes you're right about that (y)
    Good idea :)
     
  10. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    Why do you have them create php_vanilla.conf? It doesn't appear to be being used. Looks like the only thing it's used for (in your writeup) is to copy to create the phpcache config file.
    Code:
    include /usr/local/nginx/conf/php_vanilla.conf;
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    At one stage i did try fastcgi_param X_REWRITE 1 set in /usr/local/nginx/conf/php_vanilla.conf include file so to separate it from default global /usr/local/nginx/conf/php.conf. When web app's fastcgi parameters are changed or differ from centmin mod defaults, I usually modify them in a copy of /usr/local/nginx/conf/php.conf
     
  12. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    One thing about VF, it's not easy to template if you want to go totally custom.
     
  13. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Looks that way.. i haven't even figured out how to use Themes yet - that's how much of a Vanilla noob I am :LOL:
     
  14. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    I'm about 2 days into VF and spent a night researching theme-ing. From my limited time with the script, it appears that someone would need to write their own smarty functions to have a truly custom theme.
     
  15. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:20 PM
    I think I'm going to spend $34 to get the only 2 themes available on themeforest.net. At least with those I can see what they did.