Yii Framework Forum: 404 Errors on Apache2 & Ubuntu - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

404 Errors on Apache2 & Ubuntu Rate Topic: -----

#1 User is offline   Hydrazi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 11-April 12

Posted 11 April 2012 - 12:48 PM

Hello,

Super newbie here! I found a couple of apps I wanted to try out, both using Yii. I uploaded them to an external webserver, configured, and they ran quite nicely! Then I built an Ubuntu box, spent a day installing Apache2, MySQL, and scores of other things. I have maybe done this twice before, but never to support Yii and never than more as hobby interest.

I run the Yii framework requirements page and it comes back all green and happy!

I install the first app in the webroot, just to test it. All goes well, able to run their install script... but then it points the first of many "managed urls" example: /index.php/site/login

And I get a 404 not found.

I then tested the demos in the Yii framework folder and they work fine except hangman and blog, which both produce a 404 when a managed url is the link (such as the letter links in the Hangman app).

All my permissions were set to 755.... I even tried 777! I know I am missing something very basic, just too newb to see it. Help me, Obi Wans!
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 11 April 2012 - 01:16 PM

I think you need to configure Apache to allow override for the default site.
So instead of:
AllowOverride None
if should be:
AllowOverride All
In /etc/apache2/enalbled-sites/default.conf
I think.
I had to change that, otherwise the rewrite rules will have no effect even when mod_rewrite is enabled.

I lost an hour yesterday because I forgot to configure it! :P
"Less noise - more signal"
0

#3 User is offline   Hydrazi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 11-April 12

Posted 11 April 2012 - 01:28 PM

Hey thanks! I found it and the file was 000-default.
AllowOveride All was how it was set. So, no change there.
Still having these issues. It just seems to me like it's not processing the "url management". It has to be something similar to what you mentioned but in a different place.

I have installed 2 other apps on this same webserver (OpenDocMan and Collabtiv) and they work just fine.
But I love the Yii, man..... I need the Yii....
0

#4 User is offline   Hydrazi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 11-April 12

Posted 19 April 2012 - 08:41 AM

Anyone? Anyone? Bueller? Bueller? Bueller?
0

#5 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 19 April 2012 - 03:33 PM

as the URLs are the problem... its could be that mod_rewrite is not enabled in apache...
Find more about me.... btw. Do you know your WAN IP?
0

#6 User is offline   klammeraffe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 07-September 12
  • Location:Berlin, Germany

Posted 13 September 2012 - 04:07 PM

View PostHydrazi, on 11 April 2012 - 12:48 PM, said:

And I get a 404 not found.


Also check that you changed the right line with 'AllowOverride None' in your apache config file. I have for the yii config several lines with AllowOverride. Take the one with <Directory /your/yii/webroot>
0

#7 User is offline   Mr. Murder 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 23-September 12

Posted 23 September 2012 - 12:50 PM

I seem to have the same problem...
I installed mod_rewrite
and chenged the 'AllowOverride None' to 'all' as well (in all places related to 'www' folder)
but it still shows me the 'Not Found' message

Does anyone know what could be the problem?
0

#8 User is offline   parkerfrank 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 02-October 12

Posted 30 November 2012 - 01:06 AM

I have written a guide on how to customize the 404 page in Apache in my blog. I think it might be helpful too for you guys so I am going to paste the guide here.

1. You have to make sure that you have turned the rewrite module on in apache

You can follow the steps on this post to enable it

2. Create .htaccess in /var/www or edit it if you already have one

3. Add the following line in the post
Code:
ErrorDocument 404 /the-filename-of-your-customized-404-page
In my case, it is
Code:
ErrorDocument 404 /404.php
That’s done!

Please continue if you want to use the 404 page provided by your wordpress theme
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users