Re: [web2py] Re: Hosting question

2019-08-02 Thread Jose C
Glad to have helped.

Cheers,


On Friday, 2 August 2019 09:40:05 UTC+1, Rahul wrote:
>
> Hi Jose,
> Thank you !! That worked ... the point #4 resolved that issue. So 
> now no need to work with Apache and all is working well. Thanks a million!!
> artpic.in and targetsoft.co.in work fine now.
>
> Regards,
>
> Rahul
>
> On Fri, Aug 2, 2019 at 1:53 PM Jose C > 
> wrote:
>
>> Hi Rahul,
>>
>> ok,..
>> 1) no the routes.examples.py files don't cause any problems.
>> 4) Can you make sure that both *'www.domain.in ': 
>> 'app1'* as well as *'domain.in ': 'app1'* are 
>> specified in the domains key of the BASE dict?  I would hope this finally 
>> resolves your issue.
>>
>> I don't have any experience at all with Apache and if point 4) above 
>> doesn't resolve your issue then the Apache config is where I would be 
>> inclined to look. Unfortunately I'm unable to help you with that, sorry.
>>
>> Jose
>>
>> -- 
>> 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/lvOxb_mb6kQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/e37f315e-0ae4-4f36-8f44-9dec2fcb3065%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/78dbbac0-82c9-4ad4-8eaf-8679d0d1cf9e%40googlegroups.com.


Re: [web2py] Re: Hosting question

2019-08-02 Thread Rahul Dhakate
Hi Jose,
Thank you !! That worked ... the point #4 resolved that issue. So
now no need to work with Apache and all is working well. Thanks a million!!
artpic.in and targetsoft.co.in work fine now.

Regards,

Rahul

On Fri, Aug 2, 2019 at 1:53 PM Jose C  wrote:

> Hi Rahul,
>
> ok,..
> 1) no the routes.examples.py files don't cause any problems.
> 4) Can you make sure that both *'www.domain.in ':
> 'app1'* as well as *'domain.in ': 'app1'* are specified
> in the domains key of the BASE dict?  I would hope this finally resolves
> your issue.
>
> I don't have any experience at all with Apache and if point 4) above
> doesn't resolve your issue then the Apache config is where I would be
> inclined to look. Unfortunately I'm unable to help you with that, sorry.
>
> Jose
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/lvOxb_mb6kQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/e37f315e-0ae4-4f36-8f44-9dec2fcb3065%40googlegroups.com
> 
> .
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CA%2B6uMjct-Gqju0aikPPzwaLSaKFh3dz69A%2BMQt1yF2nJrDfSsA%40mail.gmail.com.


Re: [web2py] Re: Hosting question

2019-08-02 Thread Jose C
Hi Rahul,

ok,..
1) no the routes.examples.py files don't cause any problems.
4) Can you make sure that both *'www.domain.in': 'app1'* as well as 
*'domain.in': 
'app1'* are specified in the domains key of the BASE dict?  I would hope 
this finally resolves your issue.

I don't have any experience at all with Apache and if point 4) above 
doesn't resolve your issue then the Apache config is where I would be 
inclined to look. Unfortunately I'm unable to help you with that, sorry.

Jose

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e37f315e-0ae4-4f36-8f44-9dec2fcb3065%40googlegroups.com.


Re: [web2py] Re: Hosting question

2019-08-02 Thread Rahul Dhakate
Hi Jose,
Thanks for getting back - I am using nano for editing routes.py in
the live server, it isn't so friendly but gets the job done. Might be one
of the reasons for my typo - Here are the answers to rest of the questions
-

1) First of all, can you confirm this is a routes.py file in the web2py
root directory and that there are not any routes.py (app-specific routers)
files present in the app directories as well (that could be overriding the
main routes.py)?
[Rahul] There exists a *routes.example.py *  (not
routes.py) in every application folder - It also exists in web2py\ folder.
Do I need to delete it ? Does it cause issues?

2) The config I posted is my live config (other then changing domain names
and apps to make it easier to read).  It routes to the relevant apps based
on the domains as expected, even with the one app set as default.
[Rahul]Okay it routes for me tool

3) Also in the routes.py code you posted, the default_function key is
misspelt as default_*fucn*tion, which would mean it is ignored (although I
think web2py looks for 'index' anyway if none specified, but am not 100%
certain).
[Rahul] Yes I rectified that issue yesterday itself as I gave error when
accessing sites

4) Not sure about the www part.  I have a frontend redirect for my www.
domains to the normal domain.  But, what if you specify www.domain.com as
well as domain.com going to 'app1'.  Haven't tested this but would expect
it to work.
[Rahul] If I dont specify www part it redirects to /welcome saying "The
page isn’t redirecting properly"

5) Earlier I accessed both your sites at site.in/welcome and was served the
welcome app.  Now I retried and get the expected error message that it is
invalid.  Not sure if that helps.
[Rahul] This helps but still would need a cleaner way to have access to the
app mentioned only

6) Critical... you must restart the server for any change you make to
routes.py to come into effect.  Not sure if you saw this on the last post.
[Rahul] Yes this was done for every change I did.. I restarted Apache after
changes to routes.py to reload it.


Regards,

Rahul


On Fri, Aug 2, 2019 at 12:05 AM Jose C  wrote:

> Strange...
>
> 1) First of all, can you confirm this is a routes.py file in the web2py
> root directory and that there are not any routes.py (app-specific routers)
> files present in the app directories as well (that could be overriding the
> main routes.py)?
>
> 2) The config I posted is my live config (other then changing domain names
> and apps to make it easier to read).  It routes to the relevant apps based
> on the domains as expected, even with the one app set as default.
>
> 3) Also in the routes.py code you posted, the default_function key is
> misspelt as default_*fucn*tion, which would mean it is ignored (although
> I think web2py looks for 'index' anyway if none specified, but am not 100%
> certain).
>
> 4) Not sure about the www part.  I have a frontend redirect for my www.
> domains to the normal domain.  But, what if you specify www.domain.com as
> well as domain.com going to 'app1'.  Haven't tested this but would expect
> it to work.
>
> 5) Earlier I accessed both your sites at site.in/welcome and was served
> the welcome app.  Now I retried and get the expected error message that it
> is invalid.  Not sure if that helps.
>
> 6) Critical... you must restart the server for any change you make to
> routes.py to come into effect.  Not sure if you saw this on the last post.
>
>
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/lvOxb_mb6kQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/030d7db3-c097-4e97-82c8-55c0ae80b57d%40googlegroups.com
> 
> .
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CA%2B6uMjcFxKk5mE6nHgFqzcFD1byfYPbebTJk3X0W-b8Uo0vHEw%40mail.gmail.com.


Re: [web2py] Re: Hosting question

2019-08-01 Thread Jose C
Strange...

1) First of all, can you confirm this is a routes.py file in the web2py 
root directory and that there are not any routes.py (app-specific routers) 
files present in the app directories as well (that could be overriding the 
main routes.py)?

2) The config I posted is my live config (other then changing domain names 
and apps to make it easier to read).  It routes to the relevant apps based 
on the domains as expected, even with the one app set as default.

3) Also in the routes.py code you posted, the default_function key is 
misspelt as default_*fucn*tion, which would mean it is ignored (although I 
think web2py looks for 'index' anyway if none specified, but am not 100% 
certain).

4) Not sure about the www part.  I have a frontend redirect for my www. 
domains to the normal domain.  But, what if you specify www.domain.com as 
well as domain.com going to 'app1'.  Haven't tested this but would expect 
it to work.

5) Earlier I accessed both your sites at site.in/welcome and was served the 
welcome app.  Now I retried and get the expected error message that it is 
invalid.  Not sure if that helps.

6) Critical... you must restart the server for any change you make to 
routes.py to come into effect.  Not sure if you saw this on the last post.



-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/030d7db3-c097-4e97-82c8-55c0ae80b57d%40googlegroups.com.


[web2py] Re: Hosting question

2019-08-01 Thread Paco Bernal
Thank you,

Now it's working as spected.

appconfig.ini

[host]
> names = subdomain:*
>

I removed the virtualhost regarding the dedicated ips and set DocumentRoot 
in port 80 for my subdomain to /dev/null

Not sure if it's the right way but it's working now without expliciting 
having a virtualhost for each ip to avoid ip direct access.

About nginx, of course it's much better, but old customs are hard to avoid 
:)

Regards

El jueves, 1 de agosto de 2019, 12:00:01 (UTC+2), Dave S escribió:
>
>
>
> On Thursday, August 1, 2019 at 1:37:37 AM UTC-7, Jose C wrote:
>>
>> I use Lets encrypt certificates and redirecting from 80 to 443, and I 
>>> don't touch virtualhost file in port 80 so for sure, i'm doing something 
>>> wrong with apache3 and for sure with host names in appconfig.ini
>>>
>>> [host]
 names = localhost:*, 127.0.0.1:*, *:*, *


>> That is worrying.  I can only suspect some kind of misconfiguration with 
>> apache to be causing this.  Unfortunately I know nothing about apache conf 
>> so can't help.  I'd recommend creating a new post with this issue you're 
>> having... one of the more knowledgeable folks might be able to help you 
>> figure out what is going on.
>>
>  
> I'd agree that it is an Apache issue.  With my Nginx configuration, I get 
> the expected "invalid function" response from web2py.  
>
> The group wisdom seems to be that Apache setup is arcane and complicated, 
> and Massimo and others explicitly recommend Nginx for production.  If you 
> are constrained to Apache, though, that could be tough.  And I'm no help 
> there.
>
> /dps
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/98e74b5e-bc06-4ef3-9dbf-f3d10502a36f%40googlegroups.com.


[web2py] Re: Hosting question

2019-08-01 Thread Dave S


On Thursday, August 1, 2019 at 1:37:37 AM UTC-7, Jose C wrote:
>
> I use Lets encrypt certificates and redirecting from 80 to 443, and I 
>> don't touch virtualhost file in port 80 so for sure, i'm doing something 
>> wrong with apache3 and for sure with host names in appconfig.ini
>>
>> [host]
>>> names = localhost:*, 127.0.0.1:*, *:*, *
>>>
>>>
> That is worrying.  I can only suspect some kind of misconfiguration with 
> apache to be causing this.  Unfortunately I know nothing about apache conf 
> so can't help.  I'd recommend creating a new post with this issue you're 
> having... one of the more knowledgeable folks might be able to help you 
> figure out what is going on.
>
 
I'd agree that it is an Apache issue.  With my Nginx configuration, I get 
the expected "invalid function" response from web2py.  

The group wisdom seems to be that Apache setup is arcane and complicated, 
and Massimo and others explicitly recommend Nginx for production.  If you 
are constrained to Apache, though, that could be tough.  And I'm no help 
there.

/dps

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/1c5dba31-c27e-4696-9560-e9c7b2a9cd9c%40googlegroups.com.


Re: [web2py] Re: Hosting question

2019-08-01 Thread Rahul Dhakate
Hi Jose,
  I did the changes as per your suggestion. Now when I specify a
default application it takes me to the same application when I access any
domain.
Secondly -
If I specify my domain name without a www. prefix (example: artpic.in)  I
am navigated to welcome however the app is not show as its not allowed in
routes.py . If I specify the complete address it works properly example:
www.artpic.in . Have a look at the screenshot. Also you can check it as I
havent reverted the changes yet. Let me know.


*My routes.py is *

routers = dict(
> #base router
> BASE=dict(
> #default_application='Target',
> domains= {
>  'www.targetsoft.co.in' : 'Target',
>  'www.artpic.in' : 'artpic',
>   },
> #default_application = 'Target',
> applications=['Target', 'artpic', ],
> default_fucntion = 'index',
> ),
> Target = dict(
> default_language = 'en',
>languages = ['en'],
> default_function = 'index',
> ),
> artpic = dict(
> default_language = 'en',
> languages = ['en'],
>default_function = 'index',
> map_hyphen = True,
> ),
>
> )


Regards,

*Rahul*


On Thu, Aug 1, 2019 at 2:07 PM Jose C  wrote:

> I use Lets encrypt certificates and redirecting from 80 to 443, and I
>> don't touch virtualhost file in port 80 so for sure, i'm doing something
>> wrong with apache3 and for sure with host names in appconfig.ini
>>
>> [host]
>>> names = localhost:*, 127.0.0.1:*, *:*, *
>>>
>>>
> That is worrying.  I can only suspect some kind of misconfiguration with
> apache to be causing this.  Unfortunately I know nothing about apache conf
> so can't help.  I'd recommend creating a new post with this issue you're
> having... one of the more knowledgeable folks might be able to help you
> figure out what is going on.
>
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/lvOxb_mb6kQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/3611fe72-085d-459b-97b4-e5ed4fb9d34e%40googlegroups.com
> 
> .
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CA%2B6uMje7cWPJtXH1h0ySDz_GYLj%3DV6ddvv8a-e89MhLigKnYHA%40mail.gmail.com.


[web2py] Re: Hosting question

2019-08-01 Thread Jose C

>
> I use Lets encrypt certificates and redirecting from 80 to 443, and I 
> don't touch virtualhost file in port 80 so for sure, i'm doing something 
> wrong with apache3 and for sure with host names in appconfig.ini
>
> [host]
>> names = localhost:*, 127.0.0.1:*, *:*, *
>>
>>
That is worrying.  I can only suspect some kind of misconfiguration with 
apache to be causing this.  Unfortunately I know nothing about apache conf 
so can't help.  I'd recommend creating a new post with this issue you're 
having... one of the more knowledgeable folks might be able to help you 
figure out what is going on.


-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/3611fe72-085d-459b-97b4-e5ed4fb9d34e%40googlegroups.com.


Re: [web2py] Re: Hosting question

2019-08-01 Thread Jose C


> >
>  Have you removed welcome application from web2py applications folder 
> or it still resides there but when accessed gives 404? I am using python 
> 2.7.13 . I will try your settings for routes and get back to you. 
>

Normally I always delete the app, but for testing this issue I left it 
there, accessed it to check was ok.  Then just set routes.py as above and 
get 404's when trying to access it.

Both your sites seem to be working well for me.  And from both I can access 
the welcome app by just typing domain.com/welcome.  Have you made changes 
to routes.py.   

Important... note that you have to restart teh web2py server each time you 
make a change to routes.py.





-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/214a7e02-0d8b-473f-9df4-506b7667fe27%40googlegroups.com.


[web2py] Re: Hosting question

2019-08-01 Thread Paco Bernal
Yes, I discovered a few days ago that private folder can be accessed using 
the vps ip, so I have been playing with host names in appconfig.ini and 
with apache2 configuration and the only way to stop accessing private 
folder was adding a new virtualhost in apache for each vps ip with this:


> Redirect 403 /
> ErrorDocument 403 "Sorry, direct IP access not allowed."
> DocumentRoot /dev/null
> UseCanonicalName Off
> 
>
>
I use Lets encrypt certificates and redirecting from 80 to 443, and I don't 
touch virtualhost file in port 80 so for sure, i'm doing something wrong 
with apache3 and for sure with host names in appconfig.ini

[host]
> names = localhost:*, 127.0.0.1:*, *:*, *
>
>
Regards

El jueves, 1 de agosto de 2019, 9:26:26 (UTC+2), Jose C escribió:
>
> > I added the line in routes.py  - While it restricts allowing 
>> access to other applications like welcome it does not restrict 
>> redirection - so in my case it still redirected to welcome application 
>> mentioning something is wrong message. 
>>
>> Odd.  I have a similar setup to you with multiple domains, 2.18.5, py3 
> using rocket server.  If I do not place 'welcome' in the 'allowed_apps'  
> any attempt to get to any page on the welcome app returns a 404 (as 
> expected).
>  One thing that may be different... I have additional parameters in 
> routes.py which specifies the default for each app... perhaps in the 
> absence of this it tries to go back to 'welcome'?
>
> routers = dict(
> # base router
> BASE = dict(
> domains={'domain1.com' : 'app1',
>  'domain2.com' : 'app2',
>  },
> default_application = 'app1',
> applications = ['app1', 'app2'],
> default_function = 'home',
> ),
> app1 = dict(
> default_language = 'en',
> languages = ['en'],
> default_function = 'home',
> ),
> app2 = dict(
> default_language = 'en',
> languages = ['en'],
> default_function = 'index',
> map_hyphen = True,
> ),
>
>
> )
>
> Paco:  Surely appconfig.ini should never be reachable via the url due to 
> the security risks of allowing access to config info?  I paniced for a sec 
> and tried accessing mine with a link like yours but get 404 (as expected).  
> Are you saying you can see your appconfig.ini, without specifically doing 
> something to expose it, by simply accessing a link the way you formatted 
> it? 
>  
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b617507e-06b5-423d-b007-04f98734c101%40googlegroups.com.


Re: [web2py] Re: Hosting question

2019-08-01 Thread Rahul Dhakate
Hi Jose,
 Have you removed welcome application from web2py applications folder
or it still resides there but when accessed gives 404? I am using python
2.7.13 . I will try your settings for routes and get back to you.

In the meantime you may access the sites here that I referred to -
1. www.targetsoft.co.in  - is linked with app1
2. www.artpic.in is linked with app2  ( Just set-it-up yesterday but work
remains to be done for a production launch)

Regards,

Rahul

On Thu, Aug 1, 2019 at 12:56 PM Jose C  wrote:

> > I added the line in routes.py  - While it restricts allowing
>> access to other applications like welcome it does not restrict
>> redirection - so in my case it still redirected to welcome application
>> mentioning something is wrong message.
>>
>> Odd.  I have a similar setup to you with multiple domains, 2.18.5, py3
> using rocket server.  If I do not place 'welcome' in the 'allowed_apps'
> any attempt to get to any page on the welcome app returns a 404 (as
> expected).
>  One thing that may be different... I have additional parameters in
> routes.py which specifies the default for each app... perhaps in the
> absence of this it tries to go back to 'welcome'?
>
> routers = dict(
> # base router
> BASE = dict(
> domains={'domain1.com' : 'app1',
>  'domain2.com' : 'app2',
>  },
> default_application = 'app1',
> applications = ['app1', 'app2'],
> default_function = 'home',
> ),
> app1 = dict(
> default_language = 'en',
> languages = ['en'],
> default_function = 'home',
> ),
> app2 = dict(
> default_language = 'en',
> languages = ['en'],
> default_function = 'index',
> map_hyphen = True,
> ),
>
>
> )
>
> Paco:  Surely appconfig.ini should never be reachable via the url due to
> the security risks of allowing access to config info?  I paniced for a sec
> and tried accessing mine with a link like yours but get 404 (as expected).
> Are you saying you can see your appconfig.ini, without specifically doing
> something to expose it, by simply accessing a link the way you formatted
> it?
>
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/lvOxb_mb6kQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/4cdc72a0-de86-4850-915c-35a5f8eeafd9%40googlegroups.com
> 
> .
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CA%2B6uMjdusvvrEbkFNv68aXVxcP-RdTdMP-9onkReXd2MEpY4Tg%40mail.gmail.com.


[web2py] Re: Hosting question

2019-08-01 Thread Jose C

>
> > I added the line in routes.py  - While it restricts allowing 
> access to other applications like welcome it does not restrict 
> redirection - so in my case it still redirected to welcome application 
> mentioning something is wrong message. 
>
> Odd.  I have a similar setup to you with multiple domains, 2.18.5, py3 
using rocket server.  If I do not place 'welcome' in the 'allowed_apps'  
any attempt to get to any page on the welcome app returns a 404 (as 
expected).
 One thing that may be different... I have additional parameters in 
routes.py which specifies the default for each app... perhaps in the 
absence of this it tries to go back to 'welcome'?

routers = dict(
# base router
BASE = dict(
domains={'domain1.com' : 'app1',
 'domain2.com' : 'app2',
 },
default_application = 'app1',
applications = ['app1', 'app2'],
default_function = 'home',
),
app1 = dict(
default_language = 'en',
languages = ['en'],
default_function = 'home',
),
app2 = dict(
default_language = 'en',
languages = ['en'],
default_function = 'index',
map_hyphen = True,
),


)

Paco:  Surely appconfig.ini should never be reachable via the url due to 
the security risks of allowing access to config info?  I paniced for a sec 
and tried accessing mine with a link like yours but get 404 (as expected).  
Are you saying you can see your appconfig.ini, without specifically doing 
something to expose it, by simply accessing a link the way you formatted 
it? 
 

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/4cdc72a0-de86-4850-915c-35a5f8eeafd9%40googlegroups.com.


[web2py] Re: Hosting question

2019-07-31 Thread Rahul
Hi Jose,
 I added the line in routes.py  - While it restricts allowing 
access to other applications like welcome it does not restrict redirection 
- so in my case it still redirected to welcome application mentioning 
something is wrong message. 

*Paco,*
I checked for this 
"http://vps_ip/applications/app1/private/appconfig.ini"; , the problem is my 
application does not have an *appconfig.ini*. I started writing it in 2014 
or late 2013 so it does not have it as we now have in a default in 
scaffolding application. I do host the sites on web2py 2.18.5 but that's 
about it. 

Regards,

*Rahul*

On Thursday, August 1, 2019 at 2:30:25 AM UTC+5:30, Paco Bernal wrote:
>
> Hi
> Please can you test this url and tell me what you have as result?
> http://vps_ip/applications/app1/private/appconfig.ini
>
> Change vps_ip for the ip of your server and app1 for the name of your 
> application (folder name)
>
> Thx
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/48a7faaf-3559-4de9-aef6-fa0fd28ad32a%40googlegroups.com.


[web2py] Re: Hosting question

2019-07-31 Thread Jose C


> I want to avoid this and the users must only get redirected to the two 
sites that are hosted. What should I do ? Two options.

1) remove the default welcome app from your live server (simply delete the 
directory).
2) Add this key to your BASE dict (which basically tells web2py which apps 
are allowed to be accessed:
 applications = ['app1', 'app2'],

HTH,
JoseC


-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/401178c4-a65e-4f3c-971e-e89992d74cfc%40googlegroups.com.