My CodeIgniter app is working fine in WAMP using http://localhost/myapp
However, I'm getting a blank page on my Amazon EC2 micro instance using http://xxx-xxx-xxx-xxx-xxx.compute-1.amazonaws.com/myapp
.
Also, I still get the Amazon Linux AMI Test page using this link: (I commented out contents of welcome.conf): http://xxx-xxx-xxx-xxx-xxx.compute-1.amazonaws.com
My question is: what changes do I need to make in order to get my CodeIgniter application to work on my EC2 micro instance? My application does not use a database. It just queries the Twitter API and returns the results.
Here is what I've done so far:
- I uploaded my CodeIgniter app to the
/var/www/html
directory of my Amazon EC2 micro instance with no errors using FileZilla. - I also tried to disable the Amazon Linux AMI Test page by commenting out the following lines in
/etc/httpd/conf.d/welcome.conf
LocationMatch "^/+$" Options -Indexes Errordocument 403 /error/noindex.html /LocationMatch
EDIT 1 In my CodeIgniter root directory, I have a .htaccess file (see below). Do I have to do a similar configuration in my EC2 instance inorder to access my CI home page?:
RewriteEngine On
# Put your installation directory here:
# If your URL is www.example.com/, use /
# If your URL is www.example.com/site_folder/, use /site_folder/
RewriteBase /myapp
# Do not enable rewriting for files or directories that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# For reuests that are not actual files or directories,
# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]