Welcome Guest, Not a member yet? Register   Sign In
htacces on Ubuntu
#1

[eluser]canicasio[/eluser]

I´m using CI for the first time on Ubuntu 11.10 and when I run my proyect on my browser it present the next:

Code:
Error del servidor
El sitio web ha detectado un error al recuperar la http://localhost/RCC/ http://localhost/RCC/. Es posible que esta esté inactiva debido a tareas de mantenimiento o que se haya configurado de forma incorrecta.
A continuación se detallan algunas sugerencias:
Vuelve a cargar esta página más tarde.
Error de HTTP 500 (Internal Server Error): Se ha detectado una condición inesperada cuando el servidor intentaba atender la solicitud.

The code of my htacces is:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /RCC/

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^/system.*
    RewriteRule ^(.*)$ index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

The modrewrite is activated and allow, I also set the necessary permissions.

Can someone help please?
#2

[eluser]vbsaltydog[/eluser]
A 500 server error and an htaccess file's content is not nearly enough info to help you.

What errors are listed in your web server error log at the time of your 500 error?
#3

[eluser]canicasio[/eluser]
I checked the apache error log and it present something like: favico.ico was not found.
Where can I find more details about this error?

I see the URL of my project repeated twice on the browser error.
#4

[eluser]vbsaltydog[/eluser]
nobody can help you diagnose a 500 error of an unknown app on an unknown server besides pointing you to the log files. If you want more details on the error, you need to provide more details such as:

the URL, the htaccess code, and the codeigniter routes/controller code.

#5

[eluser]canicasio[/eluser]
The htacces code is:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /RCC/

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^/system.*
    RewriteRule ^(.*)$ index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

The URL I'm trying to access is:
Code:
http://localhost/RCC/


The proyect is running in my pc, Ubuntu 11.10. (/var/www/RCC) (RCC is my proyect´s name)

the default controller is Portal.php the code is:

Code:
function index() {
        $data['estilo'] = site_url() . 'CSS/admin.css';
        $data['retroceso'] = site_url() . 'JS/control_retroceso.js';
        $data['imagen1'] = site_url() . 'imagenes/logo.png';
        $data['imagen2'] = site_url() . 'imagenes/login-icon.png';
        $data['logoacap'] = site_url() . 'imagenes/acap.png';
        $data['nombre_sistema'] = "Reportes CDC";
        $this->load->view('inicio', $data);
    }

As i said the apache error log only present the next: favico.ico was not found.

I have this code on my config:

Code:
$config['base_url'] = "http://".$_SERVER['SERVER_NAME']."/RCC/";

$config['index_page'] = "";

$config['uri_protocol'] = "AUTO";

I hope this information could help to help me.
#6

[eluser]vbsaltydog[/eluser]
Where is the htaccess file located? If in the RRC directory then remove the line:

Code:
RewriteBase /RCC/

Try this controller code:

Code:
function index() {
   print 'test output';
   return;
    }
#7

[eluser]canicasio[/eluser]
Still present the same error message.

I don´t understand why it runs in Windows but not in Ubuntu.
#8

[eluser]vbsaltydog[/eluser]
Sounds like its time to post it in the jobs forum and pay someone to get it running and explain what they did.




Theme © iAndrew 2016 - Forum software by © MyBB