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 2.6 Installation Issue(s)

danno151danno151 New
edited June 2018 in Vanilla 2.0 - 2.8

I'm trying to integrate Vanilla Forums into my website, but I'm just getting a 404 on the /dashboard/setup URL. My IP does work, and I made a forums folder to add the 2.6 vanilla core to, and pushed it to my Ubuntu Server site, but testing my IP/forums/, I get redirected to ip/forums/dashboard/setup, which is a 404.

I'm using apache2, and I'm pretty sure I have PHP 7+. I do have mysql as well.

«13

Comments

  • ShadowdareShadowdare r_j MVP
    edited June 2018

    Try to rename the ".htaccess.dist" file to ".htaccess" and also modify the line #RewriteBase / to RewriteBase /forums in that file.

    Add Pages to Vanilla with the Basic Pages app

  • I've rewrote that line as you said, and I've renamed .htaccess as you said, however, the file type now read as HTAACCESS File. I'm not sure that's right, but yeah, I've retried loading the forums page with these updates, and I still get a 404.

  • After some research, it looks like I've done the .htaccess correctly. I'm not sure what I'm doing wrong.

  • danno151danno151 New
    edited June 2018

    It's being re-directed to /dashboard/setup/ but the only folder named "dashboard" is in applications. And the dashboard folder in there doesn't have a setup file/folder. Is there something I'm missing?

  • I just setup read/write perms for the necessary files, and /forums/index.php?p=/dashboard/setup does work, but it only redirect you to a 404 once you click "Continue"

  • The .htaccess file is not universal in my experience.
    It could be the .htaccess file, it could be permissions, or it could be other things. Do you have shell access to your Ubuntu server?

  • Just throwing a dart (since I don't know much about your system).. but you can try this .htaccess file:

    # Modified
    # If you modify this file then change the above line to: # Modified
    
    DirectoryIndex index.php
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
        # Certain hosts may require the following line.
        # If vanilla is in a subfolder then you need to specify it after the /.
        # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
        RewriteBase /forums
    
        DirectoryIndex disabled
    
        RewriteRule (^|/)\.git - [L,R=403]
        RewriteRule ^cache/ - [L,R=403]
        RewriteRule ^cgi-bin/ - [L,R=403]
        RewriteRule ^uploads/import/ - [L,R=403]
        RewriteRule ^vendor/ - [L,R=403]
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    
    <IfModule mod_headers.c>
       <FilesMatch "(?<!embed)\.(css|js|woff|ttf|eot|svg|png|gif|jpeg|jpg|ico|swf)$">
          Header set Cache-Control "max-age=315360000"
          Header set Expires "31 December 2037 23:59:59 GMT"
       </FilesMatch>
    </IfModule>
    

    Donovan

  • I do. I own the whole machine, and I just tested that .htaccess file. Nothing changed.

  • Just to be sure.. from within inside your forum root, can you type in 'php -v'

    example:

    cd /var/www/domain/forums/
    php -v
    

    Then also:
    mysql -v

    Then also:
    ls -la

  • Also, for good measure:
    rm cache/Smarty/compile/v*

    answer 'y' to any results.

    and

    sudo service apache2 restart

  • donovanbdonovanb
    edited June 2018

    Thx, now do this in your forum root:
    sudo chown -R www-data:www-data *

    If you still have the same .htaccess file that I posted, then try your tests again.

    Donovan




  • I didn't think it would do anything, and nothing changed. These are all still the same. (The index.php?p=/dashboard/setup re-direct me to dashboard/setup, which is a 404)

  • donovanbdonovanb
    edited June 2018

    sudo chown www-data:www-data .htaccess

  • Yes, I went through this as well... very very likely .htaccess config. First get the perms from above right, then maybe restart apache as well.


  • Still nothing...

  • can you post the contents of your .htaccess file between ~~~ characters? I think that is where the issue is.

    Also for good measure: ls -la conf/

    Thanks.

  • danno151danno151 New
    edited June 2018


    I'm not sure that you're meaning by the ~~~ so I'll just post the entire thing via less. I'm at an extreme loss at this point.

  • donovanbdonovanb
    edited June 2018

    Hi, Sorry, I didn't see this at first. do this while just outside of the root of your 'forums' directory. :
    chmod -R o+rx forums

    Donovan

  • Well, you'll have to do a bit more than above... the idea is that you want directories executable by others (but not files). So... running the above will make everything executable by others... which is fine in the short term I guess.

    Best to run a find for files to fix them after you've verified your forum works:
    find . -type f -exec chmod o-x '{}' \;

    Or, if you have not run the command in the last post yet :-), you could do:
    find . -type d -exec chmod o+rx '{}' \;

    Donovan

Sign In or Register to comment.