Step by step sample login application

69 views
Skip to first unread message

Shraddha Bandekar

unread,
Aug 22, 2012, 7:05:21 PM8/22/12
to apostrophenow
Hi i am new to apostrophe and configured it successfully on my ubuntu
machine. It would be great help if someone could post a step by step
guide to create a simple login page in apostrophe explaining the code.

Tom Boutell

unread,
Aug 22, 2012, 9:41:30 PM8/22/12
to apostr...@googlegroups.com
Hmmm, have you not already logged into your apostrophe sandbox site?
--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

shraddha bandekar

unread,
Aug 22, 2012, 11:25:08 PM8/22/12
to apostr...@googlegroups.com
No im unable to login to it as i click on submit it says login page
could not be found. Also unable to click any links in demo site as it
gives page not found for all. I have also enable mod rewrite module in
apache. Also d web/ index page shows witout css.
--
Thanks & Regards,
Shraddha.

Shraddha Bandekar

unread,
Aug 23, 2012, 1:47:32 AM8/23/12
to apostr...@googlegroups.com
Hi I am able to get the index page for demo site properly. Only issue is none of the links work and m unable to login. Mod Rewrite is already enabled

Tom Boutell

unread,
Aug 23, 2012, 7:49:21 AM8/23/12
to apostr...@googlegroups.com, apostr...@googlegroups.com
Maybe you tried to stick it in a subdirectory of another site?

Sent from my iPhone

Shraddha Bandekar

unread,
Aug 23, 2012, 8:35:19 AM8/23/12
to apostr...@googlegroups.com
No it lies in /var/www/asandbox

Fotis Paraskevopoulos

unread,
Aug 23, 2012, 8:38:23 AM8/23/12
to apostr...@googlegroups.com
Hello Shraddha,

You need to set /var/www/asandbox/web as your hosts root, from what I can gather your web root at the moment is /var/www and so your site will be available under http://localhost/asandbox which is not recommended BTW.

Read up on proper host configuration for apostrophe in the installation manual and come back to us.


Best,
Fotis

Shraddha Bandekar

unread,
Aug 23, 2012, 9:07:12 AM8/23/12
to apostr...@googlegroups.com
Thanks for quick replies. But the following is the content of my vhost file:

# Be sure to only have this line once in your configuration     
NameVirtualHost 127.0.0.1:80      

# This is the configuration for cmstest     
Listen 127.0.0.1:80
ServerName localhost     
<VirtualHost 127.0.0.1:80>       
DocumentRoot "/var/www/asandbox/web"       
DirectoryIndex index.php      
 <Directory "/var/www/asandbox/web">         
AllowOverride All         
Allow from All
RewriteEngine on       
</Directory>         

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

</Directory>     
</VirtualHost>

Currently I lost the css also for the web/index page and still unable to use the login or other links. I am new to symfony and apostrophe. And need this working fast for my current project. I have gone through the tutorials. But any further help would be great to start off quickly with my new project. 

Tom Boutell

unread,
Aug 23, 2012, 9:57:41 AM8/23/12
to apostr...@googlegroups.com
Odd. You do seem to be doing it right.

What's in web/.htaccess?

Do you have symlinks to the various plugins' web folders in the main
web folder or are they missing somehow?

The lack of any CSS is suspicious.

What's in your PHP/apache error log?

Shraddha Bandekar

unread,
Aug 23, 2012, 10:08:32 AM8/23/12
to apostr...@googlegroups.com
Contents of web/.htaccess:

Options +FollowSymLinks +ExecCGI
AddType text/x-component .htc
AddType text/javascript .jsgz
AddType text/css .cssgz
AddEncoding x-gzip .jsgz .cssgz

<IfModule mod_rewrite.c>
  RewriteEngine On

  # uncomment the following line, if you are having trouble
  # getting no_script_name to work
  RewriteBase /

  # Standby mechanism to prevent race conditions during deployment.
  # apostrophe:deploy looks for these rules and
  # comments and uncomments them at appropriate times. Please
  # do NOT modify them if you want this feature to work.
#
#  RewriteCond %{REQUEST_URI} !^/apostrophe-standby
#  RewriteRule ^.*$ /apostrophe-standby/index.html [L]

  ###### BEGIN special handling for the media module's cached scaled images
  # If it exists, just deliver it
  # We need to repeat the standby check because of the redirect issue in Apache 2.2
#  RewriteCond %{REQUEST_URI} !^/apostrophe-standby
  RewriteCond %{REQUEST_URI} ^/uploads/media_items/.+$
  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule .* - [L]
  # If it doesn't exist, render it via the front end controller
#  RewriteCond %{REQUEST_URI} !^/apostrophe-standby
  RewriteCond %{REQUEST_URI} ^/uploads/media_items/.+$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php [QSA,L]
  ###### END special handling for the media module's cached scaled images


  # we skip all files with .something
#  RewriteCond %{REQUEST_URI} !^/apostrophe-standby
  RewriteCond %{REQUEST_URI} \..+$
  RewriteCond %{REQUEST_URI} !\.html$
  RewriteRule .* - [L]

  # we check if the .html version is here (caching)
#  RewriteCond %{REQUEST_URI} !^/apostrophe-standby
  RewriteRule ^$ index.html [QSA]
  RewriteRule ^([^.]+)$ $1.html [QSA]
  RewriteCond %{REQUEST_FILENAME} !-f

  # no, so we redirect to our front web controller
#  RewriteCond %{REQUEST_URI} !^/apostrophe-standby
  RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

# Apostrophe currently requires this, but don't try to force it on
# environments that don't have php_value (those environments can
# still do it in php.ini if they have altered the default)
<IfModule mod_php5.c>
    php_value arg_separator.output "&"
</IfModule>
 
The symlinks for plugins do exist in the main web folder

The message in error log says File does not exist: /var/www/asandbox/web/sf, referer: http://localhost/asandbox/web/frontend_dev.php

Please can I have ur gtalk/skype id? For faster help.

Shraddha Bandekar

unread,
Aug 23, 2012, 10:16:17 AM8/23/12
to apostr...@googlegroups.com
Additional messages in apache error log:


[Thu Aug 23 19:26:51 2012] [error] [client 127.0.0.1] File does not exist: /var/www/asandbox/web/uploads/asset-cache/a-admin-less-9160977aae0a98abb62945704fe1038c.less.css, referer: http://localhost/asandbox/web/frontend_dev.php
[Thu Aug 23 19:26:51 2012] [error] [client 127.0.0.1] File does not exist: /var/www/asandbox/web/uploads/asset-cache/a-colors-less-050f18b43aee6462684ba8a50d5524dd.less.css, referer: http://localhost/asandbox/web/frontend_dev.php
[Thu Aug 23 19:26:51 2012] [error] [client 127.0.0.1] File does not exist: /var/www/asandbox/web/uploads/asset-cache/a-utility-less-eed1727dab3e614b1b01bb81d5810569.less.css, referer: http://localhost/asandbox/web/frontend_dev.php
[Thu Aug 23 19:26:51 2012] [error] [client 127.0.0.1] File does not exist: /var/www/asandbox/web/uploads/asset-cache/aextraslots-less-6bbc18cf5e046f1f4afbdfbe5ee00c5b.less.css, referer: http://localhost/asandbox/web/frontend_dev.php
[Thu Aug 23 19:26:51 2012] [error] [client 127.0.0.1] File does not exist: /var/www/asandbox/web/uploads/asset-cache/afeedback-less-5470275411b2b6a28a4beac04e0eeb2b.less.css, referer: http://localhost/asandbox/web/frontend_dev.php
[Thu Aug 23 19:26:51 2012] [error] [client 127.0.0.1] File does not exist: /var/www/asandbox/web/uploads/asset-cache/aawesomelogin-less-3d9691e5403ef3bc76430a11f5af6bdf.less.css, referer: http://localhost/asandbox/web/frontend_dev.php
[Thu Aug 23 19:26:51 2012] [error] [client 127.0.0.1] File does not exist: /var/www/asandbox/web/uploads/asset-cache/apeople-less-a7477d02e580ebc07f6d84413aded588.less.css, referer: http://localhost/asandbox/web/frontend_dev.php
[Thu Aug 23 19:26:51 2012] [error] [client 127.0.0.1] File does not exist: /var/www/asandbox/web/uploads/asset-cache/main-less-cd0a39713b3acb678c216f40e681c0e4.less.css, referer: http://localhost/asandbox/web/frontend_dev.php

Justen Doherty

unread,
Aug 23, 2012, 10:36:06 AM8/23/12
to apostr...@googlegroups.com
try changing the " ServerName localhost  " to something like " ServerName dev-apostrophe"  

and make an entry in your local hosts (/etc/hosts) with the following: 

127.0.0.1 dev-apostrophe 

i suspect using "localhost" in your apache config might be causing problems.. 
--
-----------------------------------------------------------------
http://www.linkedin.com/in/justendoherty - LinkedIn
http://www.twitter.com/phpchap - Twitter
http://www.anotherwebdeveloper.com - Portfolio

Shraddha Bandekar

unread,
Aug 24, 2012, 1:54:56 AM8/24/12
to apostr...@googlegroups.com
Later should I access the project as dev-apostrophe/asandbox/web? or using localhost/asandbox/web?

Shraddha Bandekar

unread,
Aug 24, 2012, 1:56:03 AM8/24/12
to apostr...@googlegroups.com
@Justen I tried with the steps and both the links above but it did not work.

Shraddha Bandekar

unread,
Aug 24, 2012, 3:35:41 AM8/24/12
to apostr...@googlegroups.com
Hi, Now I did a fresh install exactly following the steps in the apostrophe manual. Without modifying the vhost.sample. Only edited /etc/apache2/httpd.conf file to include ServerName localhost. Now I am able to get the index page perfectly with css. But still unable to open any links. Gives a page not found error. 

Shraddha Bandekar

unread,
Aug 24, 2012, 4:12:34 AM8/24/12
to apostr...@googlegroups.com
It would be of great help! if your support team could take a remote access of the machine and check with the settings.

Tom Boutell

unread,
Aug 24, 2012, 8:35:50 AM8/24/12
to apostr...@googlegroups.com
Try those links with:

http://localhost/index.php/about

Rather than just:

http://localhost/about

If the first works, then you have a mod_rewrite issue with .htaccess
being ignored or rewrites not really working, because that's exactly
what the rewrite rules are meant to address.

You might need to comment out or uncomment the RewriteBase / line in
.htaccess (if anyone knows why this is essential on some platforms and
the kiss of death on others, I'm all ears).

Shraddha Bandekar

unread,
Aug 24, 2012, 9:02:14 AM8/24/12
to apostr...@googlegroups.com
WOW THE FIRST ONE WORKS. But I do have the .htaccess file under asandbox/web and it contains the line RewriteEngine On. Also  sudo a2enmod rewrite  command gives rewrite is enabled message.

Tom Boutell

unread,
Aug 24, 2012, 9:04:28 AM8/24/12
to apostr...@googlegroups.com
I think AllowOverride is somehow not working. What's your latest httpd.conf?

On Fri, Aug 24, 2012 at 9:02 AM, Shraddha Bandekar

Shraddha Bandekar

unread,
Aug 24, 2012, 9:13:11 AM8/24/12
to apostr...@googlegroups.com
Just got it working :). Modifed 000-deafult file in sites-enabled and changed AllowOverride None to AllowOverride All. THANKS A TON FOR ALL THE INSTANT HELP! GOD BLESS YOU ALL.

shraddha bandekar

unread,
Aug 27, 2012, 2:54:42 AM8/27/12
to apostr...@googlegroups.com
Jus one more thing. I am unbale to view the edit or other button
images after login in. Also after selecting an image for the logo. It
shows d space blank instead of showing the selected image.

On Fri, Aug 24, 2012 at 6:43 PM, Shraddha Bandekar

Shraddha Bandekar

unread,
Aug 27, 2012, 8:56:24 AM8/27/12
to apostr...@googlegroups.com
Was trying to download and run an existing apostrophe project. But gives the following error when tring to execute web/index.php

500 | Internal Server Error | sfException

Attempt to generate aRoute URL for module signup with no matching engine page on the site

Tom Boutell

unread,
Aug 27, 2012, 9:10:54 AM8/27/12
to apostr...@googlegroups.com
signup is not one of our modules. Please consult the person who built
the app in question.

(The error message you mention appears when a site tries to generate
links to an engine module and there are no pages using that engine
already in the database, thus nowhere to link to.)

On Mon, Aug 27, 2012 at 8:56 AM, Shraddha Bandekar

shraddha bandekar

unread,
Aug 31, 2012, 7:22:08 AM8/31/12
to apostr...@googlegroups.com
How do we set the base url for apostrophe?
Reply all
Reply to author
Forward
0 new messages