Comments on How to Install Drupal 8.1 with Nginx, PHP-FPM and SSL on Ubuntu 16.04
Drupal is a well-known open source content management system based on PHP. It is available free of charge and released under the GNU General Public License. In this tutorial, we will install Drupal 8.1 with Nginx web server, MariaDB as the database server and PHP-FPM to handle PHP requests. I will also show you how to install an SSL Certificate to secure the Drupal website.
15 Comment(s)
Comments
Howtoforge is one of the best ..
I really enjoy (and use!) the tutorials and howtos that you guys post.
They've saved me a lot of time and grief.
Hello. I like your guide but I must admit Im struggling here.
I was hoping that at the end of the tutorial I would be able to run drupal8 on my local server and configure it using the my made up domain name as an alias for localhost (you called yours domain.me)
Can you confirm whether this is the intention?
After following the instructions, I ran into issues at the stage of installing drupal in my browser.
> If I type the new drupal domain in the new directory (you called your one "drupal.me") which only exists on my machine then my firefox browser tries to look for it online (even if I directly type http:// first). I havent made a DNS referenceto my made up domain name so it cant find it.
> If I type localhost into the browser it will show me the default nginx screen, from /var/www/html
I found there is a command to dump drupals configuration file in nginx (nginx -T) and it shows the output for both of the configuration files in /etc/nginx/sites-enabled (default and drupal8)
I first needed to remove the default page from sites enabled, and then I found I could access the drupal installation from another machine on my LAN.
After that, if I tried typing the LAN IP address for the computer hosting nginx and drupal, then the alias appeared in the browser (lets call it https://drupal8.me/core/install.php).
Typing localhost still gets me to the equivalent of drupal8.me but wont let me access /core/install.php
It also worked when I tried again with my own laptop - but only when I used the LAN IP address (not with localhost or my version of the "drupal8.me").
i.e. only when I have network access.
This either means I have done something wrong (I have been through your instructions a few times and am not sure what I could have missed) or could it be a pre-requisite to get a domain name first and DNS address?
Or do I have to make an association somewhere with my localhost address 127.0.0.1 and the drupal8.me site name somewhere for this to work?
Thanks and hope that made sense
What's the ubuntu setup needed for this install:
"ubuntu core +utility +ssh" or just "ubuntu with ssh only"
Thanks.
How do you secure this server now that we have ubuntu 16.0.4.2 x64 and drupal 8.3.3 ?
How do we keep it up to date with all the programs we have running: ?
Ubuntu
Nginx
MariaDB
Drupal
The system is updated as usual with apt:
apt-get update
apt-get upgrade
and Drupal updates get installed with the Drupal updater.
Do we need to install a firewall & other security stuff ?
When i finish install, only getting TEXT web page for Home.
if i click on login, i get GUI, and after i login i get GUI, but if i click on HOME, i then get TEXT only interface.
Why?
On home, you get the website that you created in Drupal. When you do not get a GUI interface, then you probably selected minimal and not standard install in Drupal installer which means that no test site is created so you will have to setup your whole site from scratch within Drupal.
Thanks, but i did select "Standard". a lot of the upload sites are block using openDNS, so i can't upload the pictures.
Can we have multiple drupal site on this one installation?How can we do backup/restore for drupal sites on this install?
Thnaks again.
You can host multiple Drupal sites like this, just use a different folder for each install and create a separate database and vhost configuration file for them.
How could we access the second drupal site, if we do the same config as above with a new database, directory and vhost file?
with something like this:
--------------------------------------------------------------------------------------
/* DATABASE */
mysql -u root -p
create database drupaldb2;create user drupaluser2@localhost identified by 'drupaluser2@';grant all privileges on drupaldb2.* to drupaluser2@localhost identified by 'drupaluser2@';flush privileges;\q
/* SSL */
cd /etc/nginx/ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/2drupal8.key -out /etc/nginx/ssl/2drupal8.crt
chmod 600 2drupal8.key
/* New DIRECTORY */
mkdir -p /var/www/2drupal8
/* New vHost File */
cd /etc/nginx/sites-available/vim 2drupal8
server { server_name 2drupal8.me; root /var/www/2drupal8; ## <-- Your only path reference.
listen 80; listen [::]:80; listen 443 ssl;
ssl_certificate /etc/nginx/ssl/2drupal8.crt; ssl_certificate_key /etc/nginx/ssl/2drupal8.key; ... ... ... }
ln -s /etc/nginx/sites-available/2drupal8 /etc/nginx/sites-enabled/-----------------------------------------------------------------------------------------------------
Is it possible to use just the default vhost file to tell nginx which directory to load.
eg:
cd /etc/nginx/sites-available/ vim dafault
server {
server_name drupal8.me; root /var/www/drupal8; ## <-- Your only path reference.
server_name 2drupal8.me; root /var/www/2drupal8; ## <-- Your only path reference.
listen 80; listen [::]:80; listen 443 default ssl;
Please & Thanks.
can you give a simple example. Please & Thanks.
http://nginx.org/en/docs/http/configuring_https_servers.html
found this link, but still don't undestand.
Thanks.
I love this tutorial.
Thank you.