Findra Kecil
Findra Kecil

Reputation: 11

CodeIgniter 500 Internal Server Error in subdomain

I have a problem about 500 Internal Server Error. Here is the story

  1. I made a subdomain, and put my CI-based website there.
  2. I try to access it, and it works but there is some bug that need to be fixed.
  3. After I fixed the bug, I deleted all my files in my subdomain and reupload.
  4. I try to access it, but it showed 500 internal server error. I had checked the .htaccess file, nothing is wrong because I never changed it.

here is my htaccess file

RewriteEngine on
RewriteCond $1 !^(index\.php|assets|css|js|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

here is my CI config file

$config['base_url'] = '';
$config['index_page'] = '';

and when I checked on my cpanel error log when I try to access my site. it shows like this :

[Sat May 12 20:48:23 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:23 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:21 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:21 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:20 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group
[Sat May 12 20:48:20 2012] [error] [client 180.247.155.67] SoftException in Application.cpp:254: File "/home/*****/public_html/sipr/index.php" is writeable by group

I try to access my site via localhost, it works fine. my local site address is

http://localhost/sipr/

Upvotes: 1

Views: 5931

Answers (2)

Findra Kecil
Findra Kecil

Reputation: 11

thank you very much Zenbait, your suggestion is great. Now, my website works fine.

First, I try to change the access setting to 775, like you said, but it won't work. So, I made another subdomain outside my /public_html/ folder. I set it in /home/my_username/raport/. I put my website in that folder, and try to access it. It works!!

Upvotes: 0

Seabass
Seabass

Reputation: 1973

Apache won't run code that's in your public folder that's read-writable by anyone (CHMOD 777).

I would recommend having your DOCUMENT_ROOT be somewhere outside of your home folder. /var/www/, /srv/www/htdocsc, or whatever the default is for your OS.

A backup solution is setting your access settings to Apache standards (and making it not group writable): CHMOD -R 775 sipr

Upvotes: 3

Related Questions