1

FIXED

I am using LAMP with Joomla 3.3.4 on ubuntu desktop

I am currently using the local ip (192.168.x.x) to access the site as I don't have a domain name yet while I am still developing the web site. I have been struggling with this problem for months, going over forums that have fixes that seem to work for others but not for me.

I am trying to get rid of the 'index.php' that shows in URLs which looks really dumb. Every page that isn't the homepage will look like 'domain.com/index.php/page' which I want to change to domain.com/page.

I have tried all solutions listed in http:// forum.joomla.org/viewtopic.php?t=614279 None seem to work for me while they do work for a lot of other people. This code, top rated, made absolutely no difference to me:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

The command 'a2enmod rewrite' outputs that it's already enabled and so say php and joomla.

My /sites-enabled/000-default.conf contains no <Directory> tags whatsoever, like specified in the 'AllowOverride' solution. When I added those with the code given it made my whole site go 500 internal error.

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

When I enable 'use URL rewriting' in Joomla it makes all pages 404 except for the home page (domain.com)

The apache error.log is spammed with the following:

  • A typo that I fixed which still didn't solve anything

  • '/var/www/html/.htaccess: Options not allowed here' (which I don't understand)

  • 'Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. use 'LogLevel debug' to get a backtrace'

I have no idea what's going on here, any ideas?

EDIT:

  • The 'public $live_site =' value in Joomla's configuration.php is currently not set, it is supposed to contain the domain name. When I tried setting 'localhost' it made my whole site template glitch out without solving the problem. Same for '192.168.x.x'

  • error.log is spammed with: PHP Notice: Undefined index: HTTP_HOST in /var/www/html/libraries/joomla/applications/web.php on line X

This is repeated for almost every .php file.

Could this be a permission issue with Ubuntu and Apache2? - I've had permission issues before with software, even joomla, it was unable to modify files until I set the directory permissions. - Normally your host sets permissions correctly, obviously you wouldn't be able to do anything. Though I host it myself.

EDIT 2:

Ubuntu version: 14.04

Apache2 config files: http://pastebin.com/raw,php?i=6H6rP2aY

  • Could you post apache configuration files on pastebin.com and update your question with urls? Also add Ubuntu version. It doesn't seem a permission problem, in that case you should have a permission denied error. Anyway, here is a useful link on how to set file permission – Lety Oct 29 '14 at 19:42
  • If it's not the permissions, I still think Apache is having trouble functioning correctly. But anyway, what would the proper permissions be for /www/html, /usr/share/apache2/, /ect/apache2/. Default? Do you see any wrong configurations in apache2? – Myst Oct 30 '14 at 14:59
  • Typical permissions on a unix-like system for resources would be 644 -rw-r--r-- for ordinary files and 755 drwxr-x-r-x for directories or CGI scripts. – Lety Oct 30 '14 at 23:13
  • Could you post .htaccess, each file in site_enabled and error.log? – Lety Oct 30 '14 at 23:37
  • It's fixed, I changed /var/www/ to /var/www/html/ and that did it. Thanks for your help anyway – Myst Oct 31 '14 at 12:53
1

I found the solution to my own problem.

I used this guide: http://docs.joomla.org/How_to_check_if_mod_rewrite_is_enabled_on_your_server

...to find out if mod_rewrite is functioning; It was not. What this means is that the problem does NOT lie in .htaccess or your joomla settings, but in apache.

If apache is not configured correctly, .htaccess will be ignored.

In my configs the AllowOverride was set to target /var/www/ instead of /var/www/html/. Updating that fixed the problem for me.

I hope this may help other people as well, and if you find that your apache setup passes the guide I mentioned, then your problem lies in your website; your .htaccess or joomla configs.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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