Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 .

Also, I still get the Amazon Linux AMI Test page using this link: (I commented out contents of welcome.conf):

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:

  1. I uploaded my CodeIgniter app to the /var/www/html directory of my Amazon EC2 micro instance with no errors using FileZilla.
  2. 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, use /
# If your URL is, 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]
share|improve this question

closed as too localized by MDMarra, tylerl, mdpc, ceejayoz, gWaldo May 23 '13 at 17:35

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

is your apache is compiled with PHP support on your micro instance? – Abhishek Anand Amralkar May 23 '13 at 16:24
Check /var/log/httpd/error.log. – ceejayoz May 23 '13 at 16:26
@AbhishekAnandAmralkar If he's editing /etc/httpd/conf.d/welcome.conf, he's using Apache, not nginx. – ceejayoz May 23 '13 at 16:26
@ceejayoz I have corrected my comment. – Abhishek Anand Amralkar May 23 '13 at 16:28
sudo tail /var/log/httpd/error_log will show you the last few lines of that file. – ceejayoz May 23 '13 at 17:52

Put below lines in the httpd.conf

  AddType application/x-httpd-php .php .phtml
  AddType application/x-httpd-php-source .phps

and restart apache afterward

Fond out below line in apache config

  Options Indexes FollowSymLinks

make it

  Options -Indexes FollowSymLinks

This will disable directory listing under your apache.

share|improve this answer
If he's getting a blank page (and not raw PHP source code), PHP is likely to be properly enabled, and he's just getting a 500 error due to some sort of misconfiguration. – ceejayoz May 23 '13 at 16:30
+1 Thank you very much for your reply Abhishek. I entered the lines in the httpd.conf and restarted Apache (sudo httpd -k restart). Unfortunately, the page is still blank using Interesting though, I'm not getting the Amazon AMI Test Page from anymore. I'm getting an "Index of" page which displays my "myapp" folder. When I open it, the page is blank. – Anthony May 23 '13 at 17:27
I have edited my answer please check. – Abhishek Anand Amralkar May 23 '13 at 17:31
+1 Thanks Abhishek. It worked. I'm now getting a Permission Denied message from However, see EDIT 1 in my question above. I've included the .htaccess file thats in my CodeIgniter root directory and was wondering if I have to do something similar in EC2 in order to display my application using – Anthony May 23 '13 at 18:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.