Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 6 of 6

This is a discussion on Script to add domains in the VPS & Dedicated forum
Hi! I'm trying to create a script in Linux (granted i'm a total lozer in linux, but i need to give it a try The ...

  1. #1
    JPC Member
    Join Date
    Mar 2007
    Posts
    7

    Script to add domains

    Hi!

    I'm trying to create a script in Linux (granted i'm a total lozer in linux, but i need to give it a try

    The idea is that this script will automatically do the following:

    - add a domain to my VPS (just like i would do in DirectAdmin)
    - create a public_html folder that will be the home folder for that domain
    - create an FTP account that will be pointed to that root folder

    However, i'm stuck at the first step What files do i need to modify to create such a domain? If you could point me to the files/folder i need to investigate, i would be most gratefull. Even better: a website which would explain this a bit, would help also

    Thanks a lot!

  2. #2
    JPC Member
    Join Date
    Mar 2007
    Posts
    7
    I've dug a little bit deeper and have found the following:

    if i edit /etc/named.conf
    to include

    zone "mydomain.com" { type master; file "/var/named/mydomain.com.db" };

    and create the file

    /var/named/mydomain.com.db
    with the following contents:
    [begin file]






    $TTL 14400
    @ IN SOA ns1.nameserver.com. root.mydomain.com. (
    2007031200
    7200
    3600
    1209600
    86400 )

    mydomain.com. 14400 IN NS ns1.nameserver.com.
    mydomain.com. 14400 IN NS ns2.nameserver.com.

    mydomain.com. 14400 IN A xx.xx.xxx.xx
    ftp 14400 IN A xx.xx.xxx.xx
    localhost 14400 IN A 127.0.0.1
    mail 14400 IN A xx.xx.xxx.xx
    pop 14400 IN A xx.xx.xxx.xx
    www 14400 IN A xx.xx.xxx.xx

    mydomain.com. 14400 IN MX 10 mail



    mydomain.com. 14400 IN TXT "v=spf1 a mx ip4:xx.xx.xxx.xx ?all"

    [end file]

    (sorry: deleted all sensitive data sa IP addresses)

    is this all? Or are there other files that need editing?

    And what about creating that FTP account? Could you help me with that too?

  3. #3
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    FTP account, depends on the ftp software. You can check its documentation. The main ftp account is probably the linux user which can be added using /usr/sbin/adduser

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

  4. #4
    JPC Member
    Join Date
    Mar 2007
    Posts
    7
    That's correct... I saw that the main user was admin for my FTP accounts. However, to login to my FTP account, i use other usernames & passwords. I do not know where they are placed.

    I've installed CentOS on my VPS and support @ JaguarPC has installed FTP on it. I do not know which ftp software they have installed... Is there any way to find that out?

    Thanks!

  5. #5
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    Yes, you can check with support which ftp software was installed or you can ftp to your vps and the welcome banner may tell you the name.

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

  6. #6
    JPC Member
    Join Date
    Mar 2007
    Posts
    7
    I just remember that i can view the running services using the Virtuozzo app... It appears i have proftpd installed.

    Further investigation took me to the conf file of this: /etc/proftpd.conf which eventually led me to the /usr/local/directadmin/data/users/admin/domains folder which contains, if i'm not mistaken, all the information i need to create the ftp account for my domains by using the commandline :-)

    Thanks a lot for your help JPC-Masood!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •