PDA

View Full Version : [ubuntu] Still .htaccess not working



@mir
April 6th, 2010, 07:59 AM
i have followed the tutorial from this site

https://help.ubuntu.com/community/EnablingUseOfApacheHtaccessFiles

i have changed this file /etc/apache2/sites-available/default

and in this file i have changed AllowOverride None to AllowOverride All

but still i get

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.

Plz some one help i have installed and reinstalled apache 2 time already and now i am fedup

plz help............ :(

lisati
April 6th, 2010, 08:01 AM
Moved to "Server Platforms"

Did you remember to do this: ?
sudo /etc/init.d/apache2 reload

Any clues in the server log?

cdenley
April 6th, 2010, 02:15 PM
tail /var/log/apache2/error.log

Where is the .htaccess file, and what are the permissions on it?

Pnuts
April 6th, 2010, 10:20 PM
i have changed this file /etc/apache2/sites-available/default

and in this file i have changed AllowOverride None to AllowOverride All

At a super quick glance:

Did you do it in both places in the default file?

By default it is in there twice.

-Pnuts

@mir
April 7th, 2010, 06:04 AM
At a super quick glance:

Did you do it in both places in the default file?

By default it is in there twice.

-Pnuts

Wait u mean default-ssl i have to change in that too

@mir
April 7th, 2010, 06:06 AM
tail /var/log/apache2/error.log
Where is the .htaccess file, and what are the permissions on it?


this is what i get when i write


tail /var/log/apache2/error.log



[Wed Apr 07 00:52:05 2010] [notice] caught SIGTERM, shutting down
[Wed Apr 07 09:36:01 2010] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch configured -- resuming normal operations
[Wed Apr 07 09:48:29 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/test/bbb/123
[Wed Apr 07 10:00:39 2010] [notice] caught SIGTERM, shutting down
[Wed Apr 07 10:00:40 2010] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch configured -- resuming normal operations
[Wed Apr 07 10:00:54 2010] [notice] Graceful restart requested, doing restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Wed Apr 07 10:00:54 2010] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch configured -- resuming normal operations
[Wed Apr 07 10:01:18 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Wed Apr 07 10:01:21 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

@mir
April 7th, 2010, 06:07 AM
Moved to "Server Platforms"

Did you remember to do this: ?
sudo /etc/init.d/apache2 reloadAny clues in the server log?


yes is did write this


sudo /etc/init.d/apache2 reload

and also this


sudo /etc/init.d/apache2 restart

s_
April 7th, 2010, 11:30 PM
The AllowOverride directive is set twice in the default site.
In <Directory /> it should be set to AllowOverride None
And in <Directory /var/www> to AllowOverride All

You should only allow the overrides you need. If you only need to rewrite url use
AllowOverride FileInfo
If you also need autherization use
AllowOverride FileInfo AuthConfig

You need to post the error.log from when you get the internal server error.
If it says somthing about syntax error you need to check your .htaccess syntax.

@mir
April 8th, 2010, 01:05 PM
Thankx guys

i just restarted my system it started to work

;)