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.
Options

Vanilla 2.6 Installation Issue(s)

2

Comments

  • Options
    danno151danno151 New
    edited June 2018

    I mean, I made sure conf, cache and uploads is writable by PHP, and if it wasn't, loading /forums/index.php?p=/dashboard/setup would say so. I've run those commands above, but honestly, how far am I supposed to go with that? And yes, I've tried what you've posted, and it still isn't working.

  • Options
    ShadowdareShadowdare r_j MVP
    edited June 2018

    Do you have the mod_rewrite module installed and enabled for Apache?

    Add Pages to Vanilla with the Basic Pages app

  • Options

    I didn't, but it still didn't fix the 404...

  • Options

    Please, help...

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Although Donavans version of the htaccess file should alread have worked, please use this very barebone version (as /forums/.htaccess)

    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /forums
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    

    If it still fails, put that as the last line of your conf/config-defaults.php: $Configuration['Garden']['RewriteUrls'] = false;
    That way you should at least be able to install Vanilla but it is only a temporary workaround and you really should need to fix the rewrite problem...

  • Options

    Ok. It's showing the install page like you said it should when setting $Configuration['Garden']['RewriteUrls'] = false;

    However, I'm worried... What is actually supposed to happen? I'm at an extreme loss at how to get rewrites to work, even after doing all that I did. Do you have any ideas? Or a way for me to check my dependencies if that's a possible issue, even though I have PHP 7+ and mysql?

    And if I absolutely can't get rewrites to work, will installing Vanilla in this extreme roundabout way actually work long term?

  • Options

    And I tried that .htaccess file first. It didn't work.

  • Options
    danno151danno151 New
    edited June 2018

    Ok. I returned the .htaccess back to what donovan gave me, and removed that override. (So back to normal, for the most part) and decide to test if my mod_rewrite was active at all. I set AllowOveride in my apache.conf to All, and sure enough, the rewrite works now. However, I'm concerned about security.

  • Options

    Ok. I wrote a directory to set AllowOverride All on /forums/ specifically. It was None by default. I feel like checking this and making sure it's set for the .htaccess should have been part of the Installation details on the github README.

  • Options
    x00x00 MVP
    edited June 2018

    @donovanb said:
    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

    Holly crap don't do that! I'd sooner give ownership to nobody rather the www-data for all the files in the web directory. Don't promote bad practices.

    Think clearly how you want manage your files rather then the shotgun approach. Shotgun debuging is to be avoided.

    You don't need executable php files under most gateways. Php is a scripting language, it is interpreted. You only need read permission to run it, and mostly you don't need write permissions, or gateway user/group ownership.

    grep is your friend.

  • Options

    try take logical step by step approached that lead you closer to upstanding the issue. If you solve an issue without understand why this is not that useful and could be a poor solution. Shotgun approaches are to be avoided.

    one way to determine the actual routing is to change it from an internal redirect to a 302.

    the RewriteBase has to represent actual file structure.

    grep is your friend.

  • Options

    @x00 Maybe you should read the entire thread first.

  • Options

    @donovanb said:
    @x00 Maybe you should read the entire thread first.

    Yeah....skim reading is enough to reiterate that is a bad idea.

    there is no reason to do that diagnostic or otherwise.

    People forget to set things back, and if they are encouraged to do bad habits, without knowing they are bad habits, they will take as necessary.

    This is the cargo-cult approach.

    grep is your friend.

  • Options
    donovanbdonovanb
    edited June 2018

    Well, if you are not smart enough to follow 2 instructions, then I guess, yes, it's a bad idea... but at that point, so is working on a linux OS.

  • Options

    The instruction was needless in the first place.

    Please tell me why you think it is necessary to do sudo chown -R www-data:www-data *?

    the tail should not wag the dog.

    grep is your friend.

  • Options
    donovanbdonovanb
    edited June 2018

    Why not? It's much better than root owner / group.

    chmod -R o+rx forums is actually the one that's a problem...

    He had directories that were not executable by others, so the above fixes it. Yes, this would also make files executable, but if you'd have looked at my next instruction, it fixed the executable to files.

    Now your turn.. show me where I suggested a security problem. Moreso, show me how you've helped at all in the thread.

    Donovan

  • Options
    x00x00 MVP
    edited June 2018

    becuase the web process owner / group shouldn't have ownership over file it can potentially write / execute, except in rare sandbox scenarios where you would want the framework to directly control file management through scripting or certain set-up of php where it is typically isn't www-data. It is one further step in the wrong direction. You don't have to user root however.

    Yes you are right the other command was not good, and beside you know how to use find.

    Wildcard doesn't match hidden files by default.

    grep is your friend.

  • Options

    @danno151 said:
    I set AllowOveride in my apache.conf to All

    Have you set the correct AllowOverride?

    Not this one:

    #
    # Deny access to the entirety of your server's filesystem. You must
    # explicitly permit access to web content directories in other 
    # <Directory> blocks below.
    #
    <Directory />
        AllowOverride None
        Require all denied
    </Directory>
    

    but this:

    #
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot ".../htdocs"
    <Directory ".../htdocs">
        Options Indexes FollowSymLinks
    
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   AllowOverride FileInfo AuthConfig Limit
        #
        AllowOverride All
    
        #
        # Controls who can get stuff from this server.
        #
        Require all granted
    </Directory>
    
  • Options

    @Sealord Not sure. Any directory that I can check?

  • Options

    I did do it in apache.conf, since I'm not sure how to set up a conf for a web server specifically, but I did set it specifically for /var/www/website/html/forums/

Sign In or Register to comment.