1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

How to get your pet nginx to play well with your new toy Xenforo

Discussion in 'Tips and Guides [Archive]' started by KingPin, Apr 15, 2011.

  1. KingPin

    KingPin Member

    nginx can be a moody pet. It can refuse to play well with older toys or decide to randomly pee on crappy toys... like those rhyming with umm... Dbulletin. yeah that's it. anyhoo. Now that you have decided to switch to the cadillac of toys. i.e. Xenforo, what can you do to make it so nginx loves and cherishes it like you do? well simple! follow the basic steps below to make it all go smooth like some kind of smoothing agent! like astroglide... umm. yeah thats it. *cough*... on to stuff that matters.

    scene setting :
    your domain will be example.com
    your root will be /var/www/
    your logs will be in /var/log/
    your nginx servers listens to *all* IPs and port 80

    So edit these values to your hearts content ... before you do anything else like go live with them.

    I will skip the part where you install nginx. theres plenty of resources out there. just google.

    now say you want people to only goto http://www.example.com and not http://example.com well thats simple! the easiest and most surefire way I know of how to do this is setup two blocks in the domain file under sites-available or wherever you store them.

    above code looks horrible as a quote so its also attached in a file below.
    for the record I use php-fpm which is now part of default php. its awesome. also use APC with it... it cuts my resource usage a decent amount.

    Apologies on any typos, feel free to ask any questions :) yes its my first post here so I might be unaware of something I should do/add/remove, please let me know. thanx.

    Attached Files:

  2. Jesepi

    Jesepi Well-Known Member

  3. KingPin

    KingPin Member

    i found same info on nginx wiki but yeah the config posted above takes advantage of that.
  4. SneakyDave

    SneakyDave Well-Known Member

    From that mentioned thread, you may also want to protect a couple of directories on your xenforo installation:
    #no access
        location /xf/internal_data/ {
          root  /blah/blah/public;
    #no access
        location /xf/library/ {
          root  /blah/blah/public;

Share This Page