Installation Issue on AMI Amazon EC2 server (details inside)

edited April 2014 in Installation
I hate to have to have another one of those "installation issues" discussions, but...

I've gone through the installation of fuelcms numerous times now and the results aren't what I'd like.

Currently I can set up the cms without issues, when I do not try to use any mod_rewrite stuff, but even with mod_rewrite enabled and with doing nearly everything found on the forums I have no luck with removing the index.php (also index.php?) from the URL.

I've added an alias to my httpd.conf file like one person did to "fix" his issue. I've tried $config['index_page'] = ''; $config['index_page'] = 'index.php'; as well as $config['index_page'] = 'index.php?';. All without luck.

I've tried $config['uri_protocol'] = 'AUTO';, $config['uri_protocol'] = 'QUERY_STRING'; and $config['uri_protocol'] = 'REQUEST_URI';.

I've tried RewriteRule .* index.php/$0 [L] and RewriteRule .* index.php?/$0 [L]

I've tried RewriteBase /, RewriteBase /var/www/html/, RewriteBase /fuel/ and RewriteBase /var/www/html/fuel/
^ I've also tried without the trailing "/"

I have $config['admin_enabled'] = TRUE; set
I have $config['fuel_mode'] = 'auto'; set

If I'm missing something, please let me know.

Comments

  • edited 12:47AM
    I've also set up CodeIgniter numerous times on EC2 servers without issues (with mod_rewrite)
  • edited 12:47AM
    Can you confirm the following (sorry if they seem silly, but need to ask):

    1. Is .htaccess enabled
    2. Is mod_rewrite enabled
    3. What is the current setup you are testing for the .htaccess... in particular, are you using RewriteRule .* index.php/$0 [L] or RewriteRule .* index.php?/$0 [L]?

    The 404 error being displayed is a normal Apache 404 error and not one going through FUEL, which tells me it's probably something to do with .htaccess not working correctly. Are you able to get a normal CI installation to work using .htaccess and hiding the index.php
  • edited April 2014
    Not silly :) I enjoy troubleshooting :)

    1. Sorry, but how would I determine this
    2. Yes
    3. I've tested them both
    -------------------------
    .htaccess file:
    Options +FollowSymLinks


    RewriteEngine On
    RewriteBase /


    Order Deny,Allow
    Deny From All


    # Allow asset folders through
    RewriteRule ^(fuel/modules/(.+)?/assets/(.+)) - [L]

    # Protect application and system files from being viewed
    RewriteRule ^(fuel/install/.+|fuel/crons/.+|fuel/data_backup/.+|fuel/codeigniter/.+|fuel/modules/.+|fuel/application/.+) - [F,L]


    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule .* index.php/$0 [L]

    # Prevents access to dot files (.git, .htaccess) - security.
    RewriteCond %{SCRIPT_FILENAME} -d
    RewriteCond %{SCRIPT_FILENAME} -f
    RewriteRule "(^|/)\." - [F]


    Options -Indexes
  • edited April 2014
    phpinfo(): http://ec2-54-187-20-130.us-west-2.compute.amazonaws.com/phpinfo.php

    httpd.conf:
    ...
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # AccessFileName: The name of the file to look for in each directory
    # for additional configuration directives. See also the AllowOverride
    # directive.
    #
    AccessFileName .htaccess

    #
    # The following lines prevent .htaccess and .htpasswd files from being
    # viewed by Web clients.
    #

    Order allow,deny
    Deny from all
    Satisfy All

    ...
  • edited 12:47AM
    I misread your 3rd question. I am currently testing: RewriteRule .* index.php/$0 [L]
    in my config it is: $config['index_page'] = 'index.php';

    Other info:
    // whether the admin backend is enabled or not
    $config['admin_enabled'] = TRUE;

    // options are cms, views, and auto.
    // cms pulls views and variables from the database,
    // views mode pulls views from the views folder and variables from the _variables folder,
    // and the auto option will first check the database for a page and if it doesn't exist or is
    // not published, it will then check for the corresponding view file.
    $config['fuel_mode'] = 'auto';
  • edited 12:47AM
    If you have .htaccess enabled, you should set the index_page to '':
    $config['index_page'] = 'index.php';
    With regards to checking .htaccess, you'll need to change some things in your Apache config file:
    http://tildemark.com/enable-htaccess-on-apache/
  • edited 12:47AM
    I had tried that previously with now luck, but I'll change it to what it needs to be and check the Apache configuration file in the morning. Thanks for the help so far. I really do appreciate it.
Sign In or Register to comment.