Welcome Guest, Not a member yet? Register   Sign In
Requested URL was not found on this server
#11

[eluser]WanWizard[/eluser]
The minumum rights to allow a .htaccess to work are
Code:
AllowOverride FileInfo

To test if your .htaccess is picked up at all, create a syntax error. If Apache processes it, it will complain about it.
#12

[eluser]1cookie[/eluser]
hi

[quote author="pickupman" date="1284403468"]Have you allowed .htaccess files in your apache config? Not in ubuntu right now, but I believe it's /etc/apache2/conf/httpd.conf (or site-default).

You need to have
Code:
AllowOverride All
By default this will be set to None.

[/quote]
edit:
<del>
That's strange, my
Code:
httpd.conf
file is located at
Code:
/etc/apache2/httpd.conf
(full path), but it's an empty file?

</del>

forget that! I'm told that The Debian and hence Ubuntu apache2 used apache2.conf, not httpd.conf.

And here's a snippet from apache2.conf

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

AccessFileName .htaccess

No AllowOverride directive listed though?
Quote:The apache error means it's not getting to CI. CI has it's own 404 error. Out of curiosity what happens if you remove the leading / from /index.php in your .htaccess? Or better yet, try using just this in .htaccess
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

In your example above, are you referring to a new .htaccess file as:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
<IfModule>
specifically?


Smile
#13

[eluser]pickupman[/eluser]
Yes, try the simple .htaccess file. And you are right, I wasn't on my laptop so I had forgotten the correct path to the conf file. You may also find the directive in /etc/apache2/conf/sites-default. Try the simpler less secure AllowOverride All if you are working local. Make things the easiest to get up and running, and then you can work on increasing security later.
#14

[eluser]1cookie[/eluser]
hi

I now have:

Code:
Alias /manual /usr/share/doc/apache2-doc/manual/

<Directory "/usr/share/doc/apache2-doc/manual/">
    Options Indexes FollowSymlinks
    AllowOverride All
    Order allow,deny
    Allow from all
    AddDefaultCharset off
</Directory>
in my
Code:
apache2-doc
file, full path
Code:
etc/apache2/conf.d/apache2-doc
, I had to change the AllowOveride to All.

And, my .htaccess file is as:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
<IfModule>

but still, the page wont load! :O
#15

[eluser]pickupman[/eluser]
That's not the right path.
Code:
etc/apache2/conf.d/apache2-doc

It's in
Code:
/etc/apache2/sites-available/default
#16

[eluser]1cookie[/eluser]
hi

[quote author="pickupman" date="1284410329"]That's not the right path.
Code:
etc/apache2/conf.d/apache2-doc

It's in
Code:
/etc/apache2/sites-available/default
[/quote]

I'm now editing the 'default' file, located as above. Following my edits, the file now looks like:

Code:
<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride All
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

I save the changes, restart Apache, and run the script to get:

Code:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.14 (Ubuntu) Server at localhost Port 80

Upon reading the server error.log file, i see:

Code:
[Mon Sep 13 16:51:59 2010] [alert] [client 127.0.0.1] /var/www/CodeIgniter/.htaccess: <IfModule> directive requires additional arguments
Doe's this mean (my guess) we should go back to the original .htaccess file?

Smile
#17

[eluser]pickupman[/eluser]
Just use what I posted once, without the <IfModule>.
#18

[eluser]1cookie[/eluser]
[quote author="pickupman" date="1284413170"]Just use what I posted once, without the <IfModule>.[/quote]

Yay, success!! My last clean install was on a Windows box, bit more tricky with Linux.Smile Many thanks to the Lab and Research technicians...Smile
#19

[eluser]pickupman[/eluser]
Glad you got it working. It's not so much CI, but getting apache set up right. Thankfully this got alot easier in ubuntu with 10.04.




Theme © iAndrew 2016 - Forum software by © MyBB