not configure the shared drupal codebase as an actual website, but in /var/www

Discussion in 'Installation/Configuration' started by qiubosu, Dec 17, 2010.

  1. qiubosu

    qiubosu Member

    in ISPConfig 3 control panel, Website basedir is /var/www. setup site-1.com (its document root is /var/www/site-1.com/web) and site-2.com (its document root is /var/www/site-2.com/web) sites. install the shared drupal codebase in /var/www and the drupal site installation is fine, but after installation, when browsing to http://localhost, there is a prompt pop up with the below message (browser is firefox):

    You have chosen to open
    which is a: ~ file
    from http://localhost

    What should Firefox do with this fine?
    Open with (radio button)
    Save File (radio button)
    Do this automatically for files like this from now on. (check box)

    why that? how to fix it?

    Before I tried to install the shared drupal code base in the domain directory, e.g. /var/www/site-1.com/web, after installation, the browsing to http://www.site-1.com is fine.

    what is the difference between the above two installation? apache conf files, vhost file, setup in ISPConfig 3 control panel or ...... ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The directory /var/www may not contain any website code. Access and processing of code in /var/www is disabled as it would be a huge security risk. If access to /var/www would be enabled then it uld be easy to access the private data of all websites on your server, so do not try to put any code there or to remove the access restrictions from that directory in the apache configuration. All websites have to be in the subdirectories like /var/www/site-2.com/web/
     
  3. qiubosu

    qiubosu Member

    thanks till,

    in ISPConfig 3 contral panel, how it handle the security issue to prevent access and processing of code in /var/www. how to enable to access /var/www? where to find the access restrictions for /var/www in the apache configuration.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Its all in the different files in /etc/apache2/sites-available/, especially the ispconfig.conf file. I can only warn you to do any changes there, it is a security risk if the server is connected to the internet in any way and you allow access to /var/www directly.
     
  5. qiubosu

    qiubosu Member

    hi till, if install the drupal shared codebase under /var/www/site-1.com/web, can update the website basedir in ispconfig 3 control panel from /var/www to /var/www/site-1.com/web?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This makes no sense.

    If you want to install a shared drupal, then install it into a normal website and when you install the next website, then add the directory of of the first website to the open basedir of the second one to be able to access the files.
     
  7. qiubosu

    qiubosu Member

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    no, as phpmyadmin is not installed in /var/www
     
  9. qiubosu

    qiubosu Member

    is it included in the open_basedir, so it can be accessed from all those URLs?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    If phpmyadmin is configured as alias in your setup, then it might be possible. If not, then it can be accessed only trough the default vhost. The default vhost can be reached by a IP which is not assigned to any webiste.
     
  11. qiubosu

    qiubosu Member

    hello till,

    by mistake, in ispconfig 3 control panel, i update the website basedir from /var/www to /var/www/site-1.com/web and save it. reboot the server, then the control panel doesn't work, can't browse to both sites, localhost etc. i can't access the control panel to change the website basedir back to /var/www. are there any solutions that no need to do a re-installation. help!
     
    Last edited: Dec 17, 2010
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Restart apache on the shell and post the error message that you get.
     
  13. qiubosu

    qiubosu Member

    thanks for your hint, till, the problem fixed.
     

Share This Page