Hosting a drupal website in Yunohost / questions about Drupal and Custom Webapp

Hi all,

We need to develop a website in Drupal and thinking to host it somewhere.
Using Yunohost (YNH) on a Gandi VPS for almost 1 year now, we would like to use our YNH instance to host it.
The developper is not used to work with Yunohost so I’m looking to know if YNH matches our need. But deploying a website is not common for me.

Our first concern : keep a stable YNH installation to avoid most of troubles during upgrades :smile:
We are used to install only official apps. I’ve seen juste one app “in-progress” related to Drupal, drupal_ynh but I guess it is useful if Drupal is already installed.

Actual Settings
yunohost: 2.4.2
yunohost-admin: 2.4.2
moulinette: 2.4.0.1
ssowat: 2.6.0

Among others, we already have these useful app/services installed

  • Custom Webapp
  • PhpMyAdmin
  • mysql Ver 15.1 Distrib 10.0.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 (native)
  • nginx version: nginx/1.6.2 (native)

Questions

  • what should be the big steps ? I guess installing Drupal on Debian Jessie + installing Drush + create a MySQL database with PhpMyAdmin + put the html/php files in /var/www/my_webapp/files are the baseline ?
  • installing Drupal7 and Drush : could it be dangerous for YNH (now or for future upgrades) ? incompatibility or bad interactions ?
  • most of Drupal Doc refers to Apache, is there a specific concern using Nginx which is the default web server ?
  • found, Nginx is OK ! but the Nginx 1.6.2 version of my Yunohost is not listed in the compatible Nginx versions list
  • is there a specific concern with the replacement of MySQL by its fork MariaDB ?
  • if html/php files are in /var/www/my_webapp/files, I guess everybody accessing domain.tld/site/admin/ should be able to modify the drupal website without connecting in SSH

Thanks a lot for your support,

Lops

hi there,

That’s mostly it. But I won’t advice you to use apt install drupal7 command, as you won’t have an up-to-date Drupal core. Using Drush to download the latest version (drush dl drupal) and keep you up-to-date (drush up) is a better way to go.
As a drupal developper, most of the time I work on a local environment with Git, and I just git pull on my production server, because you-should-not-work-on-production-server !

There are no incompatibilites. But you have to keep you Drupal up to date to avoid security holes. Read https://www.drupal.org/security carefully & regularly

Drupal works fine on Nginx, you’ll find lot of config files over the internet.

Drupal works fine with MariaDB.

Everybody accessing domain.tld/site/admin/ should be able to access administration interface if they have the main password. But sometimes developping Drupal means creating modules & themes, and you have to have ssh access to do so.

1 Like

Big thanks Opi for your quick answer : we’ll try this with your advices and update this post with our experiment.

The drupal_ynh package was an attempt i made at packaging drupal (but it was not successful). I hope to try again soon when I find the time and make a proper ynh package for it.

I add a drupal 8 website without LDAP authentification on yunohost using this method :

  1. Create a subdomain for the dupal website ( example : www.domain.tld )
  2. Add a Customweb App in yunohost admin with mysql database and make it public or private
  3. Modify the nginx conf of your my_webapp.conf ( or webapp2, etc. ) like that
    location / {
    alias /var/www/my_webapp/www/;

    # Default indexes and catch-all
    index index.html index.php;

	# code drupal recupere sur https://github.com/realitygaps/drupal_ynh/blob/master/conf/nginx.conf-public
	if (!-e $request_filename)
	{
	rewrite ^(.+)$ /index.php?q=$1 last;
	}
	client_max_body_size 30m;
#    try_files $uri $uri/ /index.php?$args;

    # Prevent useless logs
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    # Deny access to hidden files and directories
    location ~ ^/(.+/|)\.(?!well-known\/) {
        deny all;
    }

    # Execute and serve PHP files
    location ~ [^/]\.php(/|$) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        fastcgi_pass unix:/var/run/php5-fpm-my_webapp.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param REMOTE_USER $remote_user;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME $request_filename;
    }

    # Include SSOWAT user panel.
    include conf.d/yunohost_panel.conf.inc;
}
  1. Download and extract in the correct folder of the Customweb App /var/www/my_webapp/www
  2. Install your program normally with mysql information, your admin user, etc.
    At the end everything should be ok.
    Maybe you could have some little error, easy to correct.
1 Like