#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171

    Setting up multiple sites in Ubuntu


    Hi

    In order to set up multiple sites under same IP:

    1 - I need to change the name server from Go daddy to my ip.
    2 - On my server in /etc/apache2/sites-available I MUST add the configuration file for each domain with virtual host config like this:
    Code:
    <VirtualHost 118.9.41.231:80>
            ServerName test.d.com
            ServerAlias www.test.d.com
            #### This is where you put your files for that domain: /var/www/vhosts/test.d.com
            DocumentRoot /var/www/vhosts/test.d.com
    
             <Directory /var/www/vhosts/test.d.com>
                    Options -Indexes FollowSymLinks -MultiViews
                    AllowOverride All
                    Order deny,allow
                    Allow from all
            </Directory>
            CustomLog /var/log/apache2/test.d.com-access.log combined
            ErrorLog /var/log/apache2/test.d.com-error.log
            LogLevel warn
    </VirtualHost>
    3- Add website files under /var/www/vhost/site_name
    4 - Enable them with a2ensite site_name.
    5 - Restar Apache2
    6 - In Rackspace.com they say the only way to add the domain is to add it via cpanel under DNS tab. Is there anyways I could do it via shell so i don't have to use the Rackspace Ubuntu?

    Please explain how I can do step 6 from shell. WHy Rackspace support say "Use control panel to do it, it's the best way".

    Thank you
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,141
    Rep Power
    9398
    Originally Posted by English Breakfast Tea
    6 - In Rackspace.com they say the only way to add the domain is to add it via cpanel under DNS tab. Is there anyways I could do it via shell so i don't have to use the Rackspace Ubuntu?
    Are you talking about using Rackspace for the nameserver and adding the domain to that? Or something else?
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171
    Originally Posted by requinix
    Are you talking about using Rackspace for the nameserver and adding the domain to that? Or something else?
    Yes. I have changed the nameservers on GO Daddy to Rackspace namespaces. There is a DNS section in Racksapce control panel and I need to follow these steps so the site gets available.

    Create a domain->Add Record (A/AAAA) -> Add Ip address

    I want to be able to do this without Rackspace control panel so I see every step. Before /etc/apache2 was scary and I didnt know anything about it. Now I am familiar and know the purpose of directories in it. But I don't know how to do the Add Domain part in Shell. I am sure it is possible isn't it?
  6. #4
  7. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,953
    Rep Power
    4033
    If these are rackspace-controlled nameservers that you do not have any direct access to, then you likely will have to go through their control panel to modify their DNS settings.

    If on the other had this is just a control panel for one of your servers that you do have direct access to, then you'd just modify your DNS software's configuration files to add the A record and reload the service.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  8. #5
  9. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171
    Originally Posted by kicken
    If these are rackspace-controlled nameservers that you do not have any direct access to, then you likely will have to go through their control panel to modify their DNS settings.

    If on the other had this is just a control panel for one of your servers that you do have direct access to, then you'd just modify your DNS software's configuration files to add the A record and reload the service.
    It is a cloud server so yes it is a shared environment.
    System Image
    Ubuntu 12.10 (Quantal Quetzal)
    Flavor
    512 MB RAM, 20 GB Disk
    Disk Partition
    Automatic
    Monitoring Agent
    Not installed, host checks unavailable
    Region
    Sydney (SYD)
    Server Type
    Next Generation Server
    Reverse DNS
    Created Date
    Aug 27, 2013 at 6:02 AM
    Last Updated
    Sep 2, 2013 at 7:34 AM

    .....................

    processor : 0
    vendor_id : AuthenticAMD
    cpu family : 16
    model : 8
    model name : AMD Opteron(tm) Processor 4170 HE
    stepping : 1
    microcode : 0x10000d4
    cpu MHz : 2100.048
    cache size : 512 KB
    fpu : yes
    fpu_exception : yes
    cpuid level : 5
    wp : yes
    flags : fpu de tsc msr pae cx8 cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up rep_good nopl pni cx16 popcnt hypervisor lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch hw_pstate
    bogomips : 4200.09
    TLB size : 1024 4K pages
    clflush size : 64
    cache_alignment : 64
    address sizes : 48 bits physical, 48 bits virtual
    power management: ts ttp tm stc 100mhzsteps hwpstate
  10. #6
  11. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171
    Zend doc says:
    To create your vhost, you need to know the location of your httpd.conf file, and potentially where other configuration files are located. Some common locations:

    /etc/apache2/httpd.conf (Debian, Ubuntu, and others)
    But I don't even have httpd.conf and I am doing the same thing on:

    /etc/apache2/sites-available/sute_name



    Is it the same?
  12. #7
  13. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,953
    Rep Power
    4033
    Originally Posted by English Breakfast Tea
    Is it the same?
    Yes.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  14. #8
  15. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171
    Originally Posted by kicken
    Yes.
    Hi;

    About the file that handles virtual hosts configuration.

    On Mac book I also found httpd-vhosts.conf located under /private/etc/apache2/extra! What is that about?


    I am a bit confused Kicken.

    Why not just

    1 - Add this code to httpd.conf in /etc/apach2 (or appropriate file in site-available).
    Code:
    <VirtualHost 127.0.0.1>
    	ServerName www.mezzoblue.dev
    	DocumentRoot /Volumes/Shine/www/delhi
    </VirtualHost>
    Why do I need /etc/hosts file at all?








    About the structure of the file. I need some straight forward information on this. Can someone please explain how this is structured and which of these are compulsory and which optional?

    I added 2 comments in the example below:

    Code:
    NameVirtualHost zend:80   #This is just a name
    <VirtualHost zend:80>       #Host name and port number. Must begin with <VirtualHost name
            DocumentRoot "/Applications/XAMPP/htdocs/zend"
            ServerName zend.loc
            ErrorLog "/Applications/XAMPP/htdocs/zend/local-error.log"
            <Directory "/Applications/XAMPP/htdocs/zend">
                    Allow from all
                    AllowOverride All
                    Order Allow,Deny
                    Allow from all
                    Require all granted
            </Directory>
    
    </VirtualHost>
    Thank you
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    275
    your above post has absolutely nothing to do with virtualhosts on UBUNTU Linux!

    that info you posted is from your MACBOOK...

    Since you are using Xampp, you should not mess with any of the apache-type conf files under your /private folder.....everything you need to have access to , for editing, will be under your /Applications/XAMPP/ folder.

IMN logo majestic logo threadwatch logo seochat tools logo