Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Dec 16, 2011 12:09 pm 
Offline
Newbie

Joined: Fri Dec 16, 2011 11:04 am
Posts: 2
Hey All,

Is there some API or interface for me to automatically create subdomains using a script?

I've got creating virtual host records and restarting apache, but need to create DNS records. I think that's all that's left to make it happen. Any suggestions?

Thanks,
-Z.


Top
   
PostPosted: Fri Dec 16, 2011 12:17 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
jzumbrum wrote:
Hey All,

Is there some API or interface for me to automatically create subdomains using a script?

I've got creating virtual host records and restarting apache, but need to create DNS records. I think that's all that's left to make it happen. Any suggestions?

Thanks,
-Z.


If you are using the Linode DNS service: http://www.linode.com/api/

If you are using some other DNS solution you'll probably want to send dynamic updates, http://www.dnspython.org/ is an example of a good starting point for doing that in scripts.


Top
   
 Post subject:
PostPosted: Fri Dec 16, 2011 10:32 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
If you only have a few subdomains and they don't change a lot, just create them manually.

If you have a lot, you could use the API as @hawk7000 suggested. Even simpler, you could just create a wildcard DNS record pointing to your server and forget about it.


Top
   
PostPosted: Sat Dec 17, 2011 12:06 am 
Offline
Newbie

Joined: Fri Dec 16, 2011 11:04 am
Posts: 2
Thanks for the help guys. I ended up using CURL like this since the php bindings were too complicated to figure out given the meager instructions:

Code:
$ch = curl_init(my_linode_url_with_get_params);
curl_exec($ch);
curl_close($ch);


Worked like a charm, and super easy. Thanks!


Top
   
PostPosted: Sun Jul 22, 2012 10:40 pm 
Offline
Newbie

Joined: Sun Jul 22, 2012 10:38 pm
Posts: 2
good day,

can you tell how did you manage to add subdomains using linode? a php scripts.

Thanks a lot.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group