Here is the solution: 

Simply copy paste this:

---------------------------------------------------------------------------------------------
<VirtualHost *:80>

  WSGIProcessGroup web2py
  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
  WSGIPassAuthorization On

  <Directory /home/www-data/web2py>
    AllowOverride None
    Require all denied
    <Files wsgihandler.py>
      Require all granted
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
        /home/www-data/web2py/applications/$1/static/$2

  <Directory /home/www-data/web2py/applications/*/static/>
    Options -Indexes
    ExpiresActive On
    ExpiresDefault "access plus 1 hour"
    Require all granted
  </Directory>

  CustomLog /var/log/apache2/access.log common
  ErrorLog /var/log/apache2/error.log
  
</VirtualHost>
-----------------------------------------------------------------------------------------------

Restart Apache. It works. It is the same thing except first three line of 
SSL/443 section of the conf file. 


Deployment script on 
http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh should be 
changed, to avoid difficulty for new users. 

Thanks :)








On Monday, November 24, 2014 1:28:59 AM UTC+6, sabbir wrote:
>
> Hi,
>
> Deployed using deployment script found here  
> http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh 
> <http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh>
>
> *Found the problem. *The script created configuration is doing it:
>
> -------------------------------------------------------------------------------------------------
> <VirtualHost *:80>
>
> *  RewriteEngine On*
> *  RewriteCond %{HTTPS} !=on*
> *  RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]*
>
>   CustomLog /var/log/apache2/access.log common
>   ErrorLog /var/log/apache2/error.log
> </VirtualHost>
>
> -------------------------------------------------------------------------------------------------
>
>
> Could not figure out yet what to do with these two line 
>
> *RewriteCond %{HTTPS} !=on*
> *RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]*
>
> Any thing I do seems create a loop :(
>
>
>
>
>
> On Wednesday, November 19, 2014 12:52:32 PM UTC+6, joe black :) wrote:
>>
>>
>> Hi,
>>
>> Just deployed a new web2py using deployment script on Ubuntu.* Problem 
>> is all the traffic is forwarded to https. giving certificate error to 
>> users.* It was not like this before. How to stop this automeatic forward 
>> to https?
>>
>> Also where is the routes.py . Is it depreciated ? Then how to achieve 
>> domain to app mapping ?
>>
>> Thanks,
>> sabbir
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to