route 53 or Dns record

56 views
Skip to first unread message

karthikeyan p

unread,
Jun 1, 2019, 2:24:02 PM6/1/19
to web2py-users
i have two users  -> ONE and TWO

www.example.com/welcome/default/index/ONE => if i poster args ONE ,it will show user ONE's page

www.example.com/welcome/default/index/TWO => if i poster args TWO,it will show user TWO's page

i want to do :

one.example.com => to show user ONE's page.

two.example.com => to show user TWO's page.

i know that the url prefix record will be added to DNS record.

i have a domain in godaddy ,they provide api to do this programmatically.

if a user signed up in my page i want to make their name as prefix of my dns . (except ftp ,www. smtp etc)

any idea ?? any altenatives ?



Carlos Costa

unread,
Jun 2, 2019, 9:39:39 AM6/2/19
to web...@googlegroups.com
I was about to do this before I gave up on aws because of costs.
So I don't know exactly what have to be done.
But what I think you have to do is:
-use aws api or cli to insert the record on route53 dns
-add the respective entry on routes.py on web2py folder
 for this maybe you want to store a list of domains in a separate file, a yaml file for example and modify routes.py to read the domains configuration from it
 a yaml or plain text file will be easier to parse and feed
-force web2py to reload routes
 maybe hiting the url on the button we click in admin, or calling the required function internally (I don't know the function now)


--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/1cfce879-730d-46c0-b59b-2800d2b67954%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
At.

Carlos J. Costa
--------------------------------------------------------------
Cientista da Computação - Esp. Gestão em Telecom

karthikeyan p

unread,
Jun 2, 2019, 9:46:48 AM6/2/19
to web...@googlegroups.com
Thanks alot  for reply . I will try this idea and let you know

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/H9GXvTn6fcE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CAGsD4NxBT_32PK0c4co%2BJmYOyWvPG%2Byb-ksy2WwzvufFEjW1VQ%40mail.gmail.com.

karthikeyan p

unread,
Jun 2, 2019, 9:48:57 AM6/2/19
to web...@googlegroups.com
Can i do it with pythonanywhere.com if i am a paid user??

I have api and program to add/delete/edit dns record in godaddy 

If it is possible to make it with pythonanywhere.com , i am happy somuch

Carlos Costa

unread,
Jun 2, 2019, 4:44:49 PM6/2/19
to web...@googlegroups.com
It is not possible withou hiring extra web apps.
Pythonanywhere requires on web app per subdomain or domain.

I move recently to pythonanywhere, because of aws costs.
I am happy with evertything in pythonanywhere, unless with this topic.
I had to give up the subdomain per user strategy.

I moved to a single url strategy in wich I setup on main app as central authentication.
My problem is I have one DB for each account and that was too easy to achieve with sudbomains.


For more options, visit https://groups.google.com/d/optout.

karthikeyan p

unread,
Jun 4, 2019, 12:19:58 PM6/4/19
to web...@googlegroups.com
hai carlos costa , i have an idea for that , i have domain registered with godaddy , go daddy subdomain forwarding is unlimited and its free too . you can add like this 
in subdomain section add subdomainname as user1 , target url is your.pythonanywhere.com/welcome/default/index/user1 , when user1.yourdomain.com is called you can redirect to  your.pythonanywhere.com/welcome/default/index/user

this is my current technique . one good thing is, you have api for adding subdomain to your dns registry in godaddy. 
 


Carlos Costa

unread,
Jun 4, 2019, 5:19:32 PM6/4/19
to web...@googlegroups.com
That's good! Not perfect, since after the user is redirected, the URL gets ugly anyway.
But is quite good.
My domains are not registered in godaddy, but I can migrate to it some day.
Thanks for sharing.


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages