404 not found error with installing agasti

Asked by Tharaka sanjeewa wilfred on 2011-07-20

Hi,

I am a new user for sahana-agasti when I am installing sahana symfony there is a problem. I go through step by step as INSTALL file. After creating super username and password I clicked on the finish button then redirect to the http://localhost/agasti2/web/admin/new but 404 not found error occures.

Also I go to this pae http://localhost/agasti2/web/ and login as a super user then same 404 not found error. If there is a 404 not found error then clear the cach as INSTALL file using this command
$ ./symfony cc but same problem with me.

Please anyone can help me to solve this matter.

Question information

Language:
English Edit question
Status:
Solved
For:
Sahana Agasti Edit question
Assignee:
No assignee Edit question
Solved by:
Tharaka sanjeewa wilfred
Solved:
2011-07-30
Last query:
2011-07-30
Last reply:
2011-07-30

In the INSTALL file, there is explanation of how your .htaccess and/or
httpd.conf (or whichever configuration file for apache you have) needs to be
altered. This looks like an apache configuration issue.

On Wed, Jul 20, 2011 at 12:41 AM, Tharaka sanjeewa wilfred <
<email address hidden>> wrote:

> New question #165406 on Sahana Agasti:
> https://answers.launchpad.net/sahana-agasti/+question/165406
>
> Hi,
>
> I am a new user for sahana-agasti when I am installing sahana symfony there
> is a problem. I go through step by step as INSTALL file. After creating
> super username and password I clicked on the finish button then redirect to
> the http://localhost/agasti2/web/admin/new but 404 not found error
> occures.
>
> Also I go to this pae http://localhost/agasti2/web/ and login as a super
> user then same 404 not found error. If there is a 404 not found error then
> clear the cach as INSTALL file using this command
> $ ./symfony cc but same problem with me.
>
> Please anyone can help me to solve this matter.
>
> --
> You received this question notification because you are a member of
> Sahana Agasti PMC, which is an answer contact for Sahana Agasti.
>

Hi,

I altered httpd.conf file in apache2 folder but still having this problem 404 not found error. Please help me......

As you said I altered that httpd.conf file in apache2 but still having that
404 not found error.. Please help me to solve this..

On Thu, Jul 21, 2011 at 9:16 PM, charles wisniewski <
<email address hidden>> wrote:

> Your question #165406 on Sahana Agasti changed:
> https://answers.launchpad.net/sahana-agasti/+question/165406
>
> Status: Open => Answered
>
> charles wisniewski proposed the following answer:
> In the INSTALL file, there is explanation of how your .htaccess and/or
> httpd.conf (or whichever configuration file for apache you have) needs to
> be
> altered. This looks like an apache configuration issue.
>
> On Wed, Jul 20, 2011 at 12:41 AM, Tharaka sanjeewa wilfred <
> <email address hidden>> wrote:
>
> > New question #165406 on Sahana Agasti:
> > https://answers.launchpad.net/sahana-agasti/+question/165406
> >
> > Hi,
> >
> > I am a new user for sahana-agasti when I am installing sahana symfony
> there
> > is a problem. I go through step by step as INSTALL file. After creating
> > super username and password I clicked on the finish button then redirect
> to
> > the http://localhost/agasti2/web/admin/new but 404 not found error
> > occures.
> >
> > Also I go to this pae http://localhost/agasti2/web/ and login as a super
> > user then same 404 not found error. If there is a 404 not found error
> then
> > clear the cach as INSTALL file using this command
> > $ ./symfony cc but same problem with me.
> >
> > Please anyone can help me to solve this matter.
> >
> > --
> > You received this question notification because you are a member of
> > Sahana Agasti PMC, which is an answer contact for Sahana Agasti.
> >
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/sahana-agasti/+question/165406/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sahana-agasti/+question/165406
>
> You received this question notification because you asked the question.
>

I don't have any idea about explanation of how your .htaccess and/or
httpd.conf (or whichever configuration file for apache you have) needs to be
altered in my INSTALL file as you said. I copied that what in the INSTALL file have here. you can see and please let me know what is the reason for my problem.

SAHANA AGASTI 2.0 MAYON
Emergency Management Software

INSTALLATION INSTRUCTIONS

Updated: 2011-02-24

*** IMPORTANT NOTE: ***

These install instructions are currently tailored for systems running a LAMP
stack, specifically Ubuntu, Apache, MySQL, and PHP 5. The installation process
described in this document might work on other platforms, and with other web
servers or database engines, but it has not yet been thoroughly tested and is
not guaranteed. For questions or other support, please see the SUPPORT section
in the README file.

SYSTEM REQUIREMENTS
===================

Software
--------

The following software is required to run Sahana Agasti Mayon:

* Ubuntu 9.10 LTS or later (most current 10.04 LTS strongly recommended)
* Apache HTTP Server 2.2.14 or later (most current 2.2 preferred)
* MySQL 5.1.41 or later (most current 5.1 preferred)
* PHP 5.2.12 or later (most current 5.3 strongly recommended)

Hardware
--------

The following hardware resources are recommended to run Sahana Agasti Mayon:

* Intel Pentium or AMD Athlon CPU
* minimum of 50 MB available disk space
* minimum 512 MB RAM

SYSTEM CONFIGURATION
====================

After Sahana Agasti has been downloaded and extracted, you will first need to
configure your system before installing and using the application. These
instructions assume you have super user permissions on the target machine.

Apache
------

1. To set permissions to allow the web server appropriate access to the required
   directories, execute the following commands from the project root:

  $ sudo chgrp -R WEB_GROUP cache/ log/ config/ apps/*/config/ data/indexes/ \
      data/search/ data/sql/ web/wiki/conf/ web/wiki/data/
  $ chmod -cR g+wr config/ apps/*/config/ data/indexes/ data/search/ data/sql/ \
      web/wiki/conf/ web/wiki/data/
  $ ./symfony project:permissions

  * NOTE: Replace WEB_GROUP with the group associated with the Apache user, e.g.
    www-data or apache.

2. Create a link to the web directory of the project from the server's web root,
   for example:

  $ sudo ln -s AG_ROOT/web WEB_ROOT/agasti

  * NOTE: Replace AG_ROOT with the full filesystem path to the Agasti root
    directory, and replace WEB_ROOT with the path to your default Apache
    configuration's document root.

3. If your version of Apache supports it, write a custom configuration file for
   the application; for example:

   $ echo 'Alias /agasti/sf AG_ROOT/lib/vendor/symfony/data/web/sf
    <Directory "/var/www/agasti">
      AllowOverride All
      Allow from All
    </Directory>' > agasti

  To activate the site configuration, as well as mod_rewrite if it isn't
  already, you can then run the following commands:

  $ sudo mv agasti /etc/apache2/sites-available/
  $ sudo a2ensite agasti
  $ sudo a2enmod rewrite
  $ sudo /etc/init.d/apache2 restart

  * NOTES:

    - Again, replace AG_ROOT with the full filesystem path to the Agasti
      root directory.

    - Commands may vary slightly, depending upon your version of Apache.

    - You may instead prefer to set up an Apache Virtual Host, if you know how.

MySQL
-----

1. On the database server, create a schema for the project; for example:

  $ mysqladmin -uroot -p create AGASTI_DB

  * NOTE: Replace AGASTI_DB with the name you chose for the schema, e.g. agasti.

2. Create a dedicated database user for the application (using root is highly
   discouraged):

  $ mysql -uroot -p mysql << EOF
    GRANT ALL PRIVILEGES ON AGASTI_DB.* TO 'AGASTI_DB_USERNAME'@'DB_HOSTNAME'
     IDENTIFIED BY 'AGASTI_DB_PASS';
    EOF

  * NOTES:

    - Replace AGASTI_DB with the name you chose for the schema,
      AGASTI_DB_USERNAME with the username you chose, and AGASTI_DB_PASS with
      the password you chose.

    - For some versions of MySQL, you may need to FLUSH PRIVILEGES; before
      continuing.

3. Customize your MySQL options by adding the following either to a new .cnf
   file in your /etc/mysql/conf.d/ directory or to your /etc/mysql/my.cnf file:

    [mysqld]
    # sets default for charset=utf8 for client/connection
    character-set-server = utf8
    collation-server = utf8_general_ci

    # sets global sql_mode to enforce NOT NULL and other attribute constraints
    sql-mode=STRICT_ALL_TABLES

    [mysql]
    # sets default for charset=utf8 for server/database
    default-character-set = utf8

  To activate the new options, restart MySQL:

  $ sudo restart mysql

  * NOTE: Depending on your platform and version of MySQL, you may need to use
    this command:

    $ sudo service mysql force-reload

    or this command:

    $ sudo /etc/init.d/mysql restart

PHP
---

Set PHP's memory limit to 256 MB or greater by editing or adding the following
line in /etc/php5/apache2/php.ini:

  memory_limit = 256M

If there are any other major differences between your current php.ini and the
default recommended production settings, it is highly recommended that you reset
them via this command:

  $ sudo cp /usr/share/doc/php5-common/examples/php.ini-production \
      /etc/php5/apache2/php.ini

  * NOTES:

    - The memory_limit would still need to be modified after this copy.

    - Be sure to test that this change doesn't negatively affect other PHP
      applications you might be running.

APPLICATION INSTALLATION
========================

After you have configured your system, navigate to the install page for your
Agasti instance, e.g.:

  http://localhost/agasti/install.php

Follow the instructions on each screen, making modifications to your system in
response to any reported misconfigurations and entering appropriate information
when prompted.

After reviewing the installation configuration summary, the next step may take a
few minutes before the installer reports that is has completed and you can click
the "Finish" button.

At this point you will need to set the login credentials for the superuser by
editing the AG_ROOT/config/config.yml file (as a superuser) and replacing the
null super_user and super_pass values with something valid and secure, e.g.:

  super_user: 'somesecureusername'
  super_pass: '$ome.$ecure.pa$$w0rd!'

You should now be able sign in with those credentials and use the application.

To port these credentials to the wiki, run the script:

  sudo -u [WEB_USER] php [AG_ROOT]/apps/frontend/lib/util/wiki-auth-setup.php

Finally, generate the wiki indexes by running the following command:

  sudo -u [WEB_USER] [AG_ROOT]/web/wiki/bin/indexer.php -c

  * NOTES:

    - Replace WEB_USER with the user associated with the Apache, e.g.
      www-data or apache.

    - You can safely ignore any PHP warning of the form:
      PHP Warning: parse_url(http:///web/wiki/bin/): Unable to parse URL in ...

ERRORS AND TROUBLESHOOTING
==========================

- Blank page after clicking "Install", or "500" error page:

  The file permissions or database permissions are possibly misconfigured.
  Ensure the web server has proper access to the appropriate files and
  directories and check your web server error log. Also, ensure the proper
  version of PHP is installed; please see the SYSTEM REQUIREMENTS section.

- 404 error page:

  Verify that symbolic links are being followed and that your web server is
  pointing to the expected directory for the application.

- Installation instructions are followed properly and all settings configured
  correctly, but still unable to log into the application with proper
  credentials:

  Clear the Symfony cache with this command, executed from your AG_ROOT:

  $ ./symfony cc

  and try again.

- I have another error, or my issue still isn't resolved:

  Please see the SUPPORT section in the README file for information on how to
  contact the developer community.

Thank you for using Sahana Agasti!
                                     The Sahana Software Foundation
                                     http://www.sahanafoundation.org/

Usman A (usmonster) said : #5

What version of Ubuntu and Apache are you running?

Can you also paste the Agasti-specific portions of your httpd.conf file here?

ubuntu 10.10
Server version: Apache/2.2.16
httpd.conf is empty that is in etc/apache2/

ubuntu 10.10
Server version: Apache/2.2.16

I attached httpd.conf file here. It is in etc/apache2/httpd.conf but it is
empty know.

Thanks.

On Thu, Jul 28, 2011 at 10:36 PM, Usman Akeju <
<email address hidden>> wrote:

> Your question #165406 on Sahana Agasti changed:
> https://answers.launchpad.net/sahana-agasti/+question/165406
>
> Status: Open => Needs information
>
> Usman Akeju requested more information:
> What version of Ubuntu and Apache are you running?
>
> Can you also paste the Agasti-specific portions of your httpd.conf file
> here?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/sahana-agasti/+question/165406
>
> You received this question notification because you asked the question.
>

Usman A (usmonster) said : #8

In place of the httpd.conf, did you create the config file for the site (as per step 3 of the Apache section in the INSTALL instructions) and place it in /etc/apache2/sites-available/ ?

Of course I did that. /etc/apache2/sites-available/agasti
what in this file is

Alias /agasti/sf /var/www/Mayon/lib/vendor/symfony/data/web/sf
<Directory "/var/www/agasti">
AllowOverride All
Allow from All
</Directory>

Usman A (usmonster) said : #10

Ah, thanks for that -- now just a couple more questions, and I think we can figure out what's happening.

- To what directory did you initially checkout the project? (e.g. where is the parent directory that contains apps, config, web, and all those other directories?)
- Is /var/www/Mayon an actual directory or a symlink?
- Is /var/www/agasti an actual directory or a symlink? (does it actually exist?)
- Is there an agasti2 directory somewhere?

I noticed that you access your app at at http://localhost/agasti2/web/ -- the INSTALL instructions should usually lead you to a url that doesn't include /web , so I feel like we're getting closer to the issue at hand..

Firstly I got agasti.zip file from another PC and after it move to the www directory.

parent directory is in /var/www/Mayon
also there is a /var/www/agasti2 directory

Usman A (usmonster) said : #12

Ah, getting closer -- do both /var/www/Mayon and /var/www/agasti2 have the same contents? Or does one link to the other's web/ directory? Actually, can you get the output from the command:

ls -l /var/www

..and paste it here? It looks like your config file might be pointing to the wrong place.

Another thing you could do is look at the Apache error log (probably somewhere like /var/log/apache2/error.log ) and copy-paste the contents from when you were trying to install.

Actually both /var/www/Mayon and /var/www/agasti2 have the same contents.

tharaka@tharaka-LIFEBOOK:~$ ls -l /var/www
total 32
drwxr-xr-x 14 tharaka tharaka 4096 2011-07-20 12:47 agasti2
-rw-r--r-- 1 root root 177 2011-07-22 13:07 index.html
drwxr-xr-x 11 root root 4096 2011-07-27 13:55 jobeet
drwxr-xr-x 13 tharaka tharaka 4096 2011-07-22 13:57 Mayon
lrwxrwxrwx 1 root root 26 2011-07-17 16:01 public_html -> /home/tharaka/public_html/
drwxrwxrwx 13 tharaka tharaka 4096 2011-07-18 10:54 sahana-agasti
drwxrwxrwx 14 root root 4096 2011-07-05 21:19 sahana-phase2
drwxr-xr-x 11 root root 4096 2011-07-23 15:27 symfony
-rw-r--r-- 1 root root 20 2011-07-22 13:07 testing.php

These are the files in /var/log/apache2/

tharaka@tharaka-LIFEBOOK:~$ ls -l /var/log/apache2/
total 548
-rw-r----- 1 root adm 400347 2011-07-30 07:52 access.log
-rw-r----- 1 root adm 106222 2011-07-24 12:31 access.log.1
-rw-r----- 1 root adm 30519 2011-07-30 07:52 error.log
-rw-r----- 1 root adm 10873 2011-07-24 12:31 error.log.1
-rw-r--r-- 1 root root 0 2011-07-22 13:07 other_vhosts_access.log
-rw-r--r-- 1 root root 0 2011-07-11 14:17 smronju.access.log
-rw-r--r-- 1 root root 0 2011-07-11 14:17 smronju.error.log
tharaka@tharaka-LIFEBOOK:~$

Usman A (usmonster) said : #14

Ok, cool. Can you try moving one of the agasti directories to somewhere outside of /var/www ?

For example, if you had a /home/tharaka/agasti dir, that would be your AG_ROOT in the INSTALL instructions. (WEB_ROOT is of course /var/www .) Then you would link the /home/tharaka/agasti/web directory to /var/www/agasti -- it's important that this directory points to the web directory, and also that it's named the same as the file you put in /etc/apache2/sites-available . Then the contents of the file would be:

Alias /agasti/sf /home/tharaka/agasti/lib/vendor/symfony/data/web/sf
<Directory "/var/www/agasti">
  AllowOverride All
  Allow from All
</Directory>

And thing shoooouuuld work (hopefully!). Does that make sense?

:)

Of course it is ok now. I am very happy with your instructions. Firstly my AG_ROOT was always in the /var/www/ directory and I had give AG_ROOT path as /var/www/agast like that and WEB_ROOT was in /etc/apache2 so that is the problem with I had. Now I created agasti new directory in /home/tharaka/agasti and go through instructions with INSTALL file as you mentioned before. Now I can go head. Thanks for a lot to you.

:)))))

Usman A (usmonster) said : #16

You're very welcome, and I'm glad to help! :]

LinkedIn
------------

I'd like to add you to my professional network on LinkedIn.

- Tharaka

Tharaka Wilfred
Associate Software Engineer at Access Telecom Technologies (PVT) LTD
Sri Lanka

Confirm that you know Tharaka Wilfred:
https://www.linkedin.com/e/v05fae-h1fyq6ax-72/isd/6824063758/mfBTEoLv/?hs=false&tok=0rqWFvdXuYBRc1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/v05fae-h1fyq6ax-72/X2WdMEmiXdMIBMrhwqyf2-myZk1lJXuJr2SuLcrVe60dBlrVwOeog_/goo/question165406%40answers%2Elaunchpad%2Enet/20061/I2351915810_1/?hs=false&tok=0RTB5jlImYBRc1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

LinkedIn
------------

I'd like to add you to my professional network on LinkedIn.

- Tharaka

Tharaka Wilfred
Software Engineer at ONEzero Company Ltd.
Sri Lanka

Confirm that you know Tharaka Wilfred:
https://www.linkedin.com/e/v05fae-hawfnify-5f/isd/6824063758/mfBTEoLv/?hs=false&tok=2Ti7g2WTs7R5w1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/v05fae-hawfnify-5f/X2WdMEmiXdMIBMrhwqyf2-myZk1lJXuJr2SuLcrVe60dBlrVwOeog_/goo/question165406%40answers%2Elaunchpad%2Enet/20061/I3368157173_1/?hs=false&tok=3ErNeS_lY7R5w1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.