Results 1 to 3 of 3

Thread: a2ensite

  1. #1
    Join Date
    Oct 2006
    Crawley, West Sussex, UK
    Ubuntu 13.04 Raring Ringtail



    I have read the documentation but I am struggling to understand the reason for a2ensite.

    I have a LAMP set-up in Ubuntu 12.04 and have folders for Joomla, Wordpress, Drupal etc and have managed to install each application successfully in each sub-folder.

    Some guides for installing applications such as Joomla use the a2ensite command:

    For example:

    2. Configuring Joomla and Apache

    Run now these commands to add a Joomla config file to Apache:

    cd /etc/apache2/

    sudo cp sites-available/default sites-available/joomla

    Next, enable the Joomla website with these commands:

    sudo a2ensite joomla

    sudo /etc/init.d/apache2 restart

    Cam I ask why this is important and if I need to do it for every application I run in a separate folder.

    Many thanks

    Peter Jones

  2. #2
    Join Date
    Sep 2006
    Ubuntu 14.04 Trusty Tahr

    virtual hosts

    a2ensite is for enabling different virtual hosts. If you run everything from one and the same host, then you only need one virtual host. If you were going to be running several different sites from the same web server, then you could make use of port-based virtual hosts or name-based virtual hosts.

  3. #3
    Join Date
    Jan 2005
    South Africa
    Ubuntu 12.04 Precise Pangolin

    Re: a2ensite

    I'm not sure what joomla exactly tries to achieve with the above as it's actually incomplete in my opinion. It will however prevent a (possible) clash of session variables.

    Assume that your joomla 'site' keeps track of a userid in a session variable called userid (e.g. to allow certain operations on the site) and that your drupal 'site' also keeps track of it for the same reason.
    At the moment that you login in your joomla 'site, and you navigate to your drupal 'site', you're also logged in there (maybe with an userid that allows more).

    Note that I used single quotes around the word 'site' as it's actually not a site.

    a2ensite is there to enable different websites on the same host (so-called virtual hosting). You can then e.g. access your joomla site using http://joomla en your drupal site with e.g. http://drupal.

    Your ...../sites-available/joomla and so on however need to be modified to indicate that the servername is joomla and the document root must point to the directory where joomla is installed. Same for drupal etc
    If you don't make backups of your important data, your data is obviously not important to you.

Tags for this Thread


Posting Permissions

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