Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla on Nginx

2»

Comments

  • Getting emails like this. Is it coming from here?

    [Penny Arcade] Todd commented on your bookmarked discussion.

    Todd commented on your bookmarked discussion.

    [Vanilla on Nginx]
    Test @Soviet Simplex

    ---
    Follow the link below to check it out:
    http://vanilla.local/discussion/comment/140660#Comment_140660
  • lucluc ✭✭
    @Todd doing test :). I notified him.
    He surely made a copy of the production database, then doing local test.
  • ToddTodd Chief Product Officer Vanilla Staff
    @brujah, sorry!!! I was testing and edited a random name.
  • I found that the nginx config setup for MyBB worked with Vanilla out of the box, no modifications required. nginx 1.0.4 on Ubuntu 11.
  • edited January 2012

    dandv said:
    I found that the nginx config setup for MyBB worked with Vanilla out of the box, no modifications required. nginx 1.0.4 on Ubuntu 11.

    It's not true. Doesn't work at all.

    rlaskey said:
    Here's the way I was able to tackle nginx w/ Vanilla:location /forum {try_files $uri $uri/ @forum;}
    location @forum {rewrite ^/forum(.+)$ /forum/index.php?p=$1 last;}

    It's better not to use if statements ( http://wiki.nginx.org/IfIsEvil ), and the @ syntax provides for named locations, which is useful for having systems not in the root path, etc. Short and sweet.

    Links Logout, SignIn, all social connects are broken with 403 Forbidden.

    Please give somebody really working NGINX rewrites for lasted version of Vanilla!!!

  • lucluc ✭✭
    edited January 2012

    @neolo: Did you do that ?:

    swook said:

    >

    Also, don't be an idiot like myself and set

    >

    $Configuration['Garden']['RewriteUrls'] = TRUE;

    >

    in conf/config.php instead of wondering why pretty urls aren't working!

    As this very forum (vf.org) is ran off nginx, it does work for sure :)

  • TimTim Operations Vanilla Staff
    edited January 2012
    server {
    
       server_name "myforum.whatever.com";
       listen 80 default;
    
       root /var/www/myforum;
       index index.html index.htm index.php;
    
       ## PHP handler
       location ~* \.php$ {
          # turn off caching for php
          expires -1;
    
          # send to fastcgi
          include fastcgi_params;
          fastcgi_pass    backend;
       }
    
       ## Default location
       location / {
          try_files $uri @site;
       }
    
       location @site {
          rewrite ^ /index.php?p=$uri&$args last;
       }
    
       ## Disable viewing .htaccess & .htpassword & config
       location ~ "^/\.htaccess$" { deny all; }
       location ~* "/conf/.*$" { deny all; return 403; }
    }
    
    upstream backend {
       server 127.0.0.1:9000;
    }
    

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • TimTim Operations Vanilla Staff

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • Tim said:
    @Neolo

    Thanks but this piece of config is not working for me:

    location @site {
    rewrite ^ /index.php?p=$uri&$args last;
    }

    I'm using embedded vanilla on lasted nginx+php-fpm. And seems to be I forced it to work fine with:

    location /discuss {
    index index.php;
    try_files $uri $uri/ @forum;
    }
    location @forum {
    rewrite ^/discuss(.+)$ /discuss/index.php?p=$1 last;
    }

    Just last time I tried to use this code, I forgot to define an index page.

    Thank you.

  • @Tim rewrite ^ /index.php?p=$uri&$args last; Works.

Sign In or Register to comment.