Ubuntu 18.04

Tutorials, projects and questions about Ubuntu 18.04, Bionic Beaver, a long-term support release that was released April 26, 2018 and will be supported by Canonical until April of 2023.

Ubuntu 18.04 subscription active
You will receive email notifications for new publications on Ubuntu 18.04.
1436 Results
  • Question

    connect() failed (111: Connection refused) while connecting to upstream

    Hi all, Followed this (https://lengstorf.com/code/deploy-nodejs-ssl-digitalocean/) tutorial to get Let's Encrypt working on my Nest.js/Node server. Everything works - running sudo nginx -t returns: nginx: the configu...
    Accepted Answer: Hello, You can only have 1 service listening on 1 port. So as you have Nginx listening on port 80 at the moment, you can not have your Node on the same port. Also as you currently have your Nginx set to work as a reve...
    8 By hbendixlewis Nginx API Let's Encrypt DigitalOcean Ubuntu 18.04
  • Question

    How do I forward client IP instead of proxy IP in Nginx Reverse Proxy?

    Overview I have a setup that looks like this: * Nginx Reverse Proxy with a Floating IP * Reverse Proxy is configured to forward requests from users to a 3rd party SaaS application, BigCommerce which then handles the r...
    Accepted Answer: Hi @cvanorman I think that what you have in place is correct in terms of the 4 headers that you've configured already. What is the output of the Nginx access logs? Are you seeing the correct IP there?
    2 By cvanorman Nginx Ubuntu 18.04 Networking
  • Question

    How can I run a rake task in my production environment?

    I have set up a rake task that I want to run once an hour using a cron expression. I got it working on my local dev environment, but I can't get it to work on my production environment hosted here. I have the followin...
    Accepted Answer: HI! Let me see if I can help. The first thing that comes to mind is that you do need to set the environment and use bundle. Be sure you're in the root of your rails app, and that you're using the user your app runs as...
    1 By donkerbc Ruby on Rails PostgreSQL Ruby Ubuntu 18.04
  • Question

    media files returns 404 not found

    my nginx file looks like: ``` location = /favicon.ico { accesslog off; lognot_found off; } location /static/ { alias /home/me/projectdir/static/; } location /media/ { alias /home/me/projectdir/media/; } locati...
    Accepted Answer: Hi there @elprincipe, Do you see any errors in your Nginx error log? You can check that with the following command: command,bash sudo tail -100 /var/log/nginx/error.log It is quite possible that Nginx does not have t...
    1 By elprincipe Nginx Python PostgreSQL Django Python Frameworks Ubuntu 18.04 Databases
  • Question

    trying to install mysql but I cannot start the service and cannot locate mysqld.sock

    I'm trying to install mysql but I cannot start the service and cannot locate mysqld.sock I am following the how to here: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-sta...
    Accepted Answer: Hi there @dezshredder, To me it looks like that your MySQL service is stuck in a crash loop as the status output that you've shared indicates that the status is: "Server startup in progress" and the uptime is 15 secon...
    3 By dezshredder Ubuntu MySQL Ubuntu 18.04 Databases
  • Question

    How to connect to wordpress website on Ubuntu 18.04 via HTTPS://IPaddress??

    I was following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04 on my Ubuntu 18.04 droplet and I followed everything to the letter but when I go to ht...
    Accepted Answer: Hi @liberdamj, Usually these tutorials are directed in cases you want to use your domain rather than your IP address. You'll need to make change to your file /etc/apache2/sites-enabled/000-default.conf Open the file ...
    1 By liberdamj Ubuntu 18.04 WordPress LAMP Stack
  • Question

    Ansible playbook error: mapping values are not allowed in this context

    I am trying to play with Ansible a little bit and I've created a test playbook but it is failing for some reason and I can't figure out why. I've tested the connectivity between my control node and the worker node but...
    Accepted Answer: Hello, The playbook looks good, there's only a slight indentation error, Yaml is very strict about the indentations and the spacing. You need to make sure that you have two spaces before the - name part of your playb...
    3 By bitmap Ansible Ubuntu 18.04
  • Question

    Unable to resolve DNS from with a droplet created via terraform

    I've created a droplet and firewall config (using terraform) from the docker-18-04 and docker-20-04 images and I am unable to perform any DNS resolution from within these hosts. I've opened 53/tcp and 53/udp outgoing ...
    Accepted Answer: It's actually a problem with all outgoing traffic, I've rewritten the question: https://www.digitalocean.com/community/questions/droplets-created-with-terraform-have-no-outgoing-network-access
    1 By zenhob DNS Ubuntu 18.04 Ubuntu 20.04 Terraform
  • Question

    Disable old TLS versions (1.0/1.1 ) for Apache/Nginx on Ubuntu 18.04 or CentOS 7

    I recently got asked how we can disable old TLS versions on a server. The user was applying for a PCI compliance and wanted to have only TLS 1.2 running on their machine in order to pass the scan of the PCI vendor.
    Accepted Answer: Here is a little step by step guide on how to set this on a CentOS server. <^>Before you start, please keep in mind that you can always run into some issues and it's really important to make a working copy of your con...
    2 By alexdo Ubuntu 18.04 CentOS Apache Nginx
  • Question

    My Droplet wont boot, goes directly to grub rescue (Ubuntu 18)

    Hey! All I get is "Booting from Hard Disk..." "error: symbol 'grub_calloc' not found" "Entering resuce mode..." and then grub rescue> I've tried everything, including booting from recovery and tried to reinstall grub ...
    Accepted Answer: Hi, First things first, if the environment configuration of your droplet is difficult to replicate, I recommend you to wait for a response from DO support team, and to not perform any action unless they instruct you t...
    3 By kimmymonassar Ubuntu Configuration Management Ubuntu 18.04 System Tools
  • Question

    My Droplet Network Is Down !!

    1 day past and I still have the same problem, I resized my droplet and when I'm trying to access to my ssh or ping into my IPs I can't find my server, it seems like it's stopped and disconnected. The console work very...
    Accepted Answer: Hey, @anassbenhima, You say you receive 100% packet loss when you try to ping your droplet. I am just assuming here but this may be related to the global outage that happened a couple of days ago - https://www.techrad...
    1 By anassbenhima Networking Ubuntu 18.04
  • Question

    Ansible problem: Shared connection to server closed

    I have two servers, one is my control node and one is the worker. I've installed Ansible on the control node with the following command: apt update -y && apt install ansible -y And it seems to be working fine. I als...
    Accepted Answer: Hello, I've seen this problem before. I think that by default python 2 is not installed on Ubuntu 18.04 . So a quick fix here is to just add the path to python 3 in your inventory file. It would look something like th...
    1 By bitmap Ansible Development Ubuntu 18.04
  • Question

    How to Reset The Firewall on Ubuntu

    What You'll Need A Droplet running Ubuntu 16.x or 18.x SSH or Console Access (https://www.digitalocean.com/docs/droplets/resources/console/#log-in-with-the-console) to your Droplet Why Reset The Firewall? If you find ...
    Accepted Answer: If you'd prefer to use a one-liner that you can copy and paste to perform the same actions noted in the guide above, please feel free to use: sudo ufw --force disable \ && sudo ufw --force reset \ && sudo ufw default...
    2 By jtittle Firewall Ubuntu Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
  • Question

    How to permanently change DNS nameservers in Ubuntu 18.04.3? Wiki article is not working.

    Hello, I am trying to permanently change the DNS nameserver being using on my droplet. I following this article: https://www.digitalocean.com/community/questions/how-do-i-switch-my-dns-resolvers-away-from-google But t...
    Accepted Answer: Hello, With the older Ubuntu distributions, you could do that with the /etc/resolv.conf however, with Ubuntu 18.04 you should make the change in the netplan configs at /etc/netplan/*.yaml files. The file would look so...
    2 By Aerience Ubuntu 18.04 DNS
  • Question

    Process kswapd0 triggers 100% CPU usage

    Hi, I installed the Docker Droplet (https://marketplace.digitalocean.com/apps/docker) of DO and loaded a modest docker-compose service. After a week of working ok and uninterrupted for 8 days. Suddenly cpu fired up ...
    Accepted Answer: Just for the record: finally I the rebuild the project with the new swap configuration and everything it is going smoothing and with a 0.65% of CPU. I learned that when the project runs low in memory, the operatives...
    4 By willypregliasco Docker Ubuntu 18.04
  • Question

    How to configure NGINX to avoid 502 Bad Gateway when communicates with a Docker container?

    Hi, my case is that after having set up a new Droplet with an Ubuntu 18.04 server and have followed the DO tutorials to: 1. Install Nginx 2. Secure Nginx with Let's Encrypt 3. Install Jenkins 4. Configure Jenkins with...
    Accepted Answer: OK just add an update that some days after my latest post, I realized that the main and only reason the server was going down was a lack of resources in the droplet. So I was using a droplet with 1GB of RAM, 25GB HD, ...
    3 By jlbb Nginx Docker Ubuntu 18.04 CI/CD Node.js
  • Question

    Why was the lamp-18-04 slug used for the new 20.04 image?

    I just suffered a ~1 hour server outage on a routine redeploy due the the image slug lamp-18-04 actually deploying Ubuntu 20.04. You can see in the screenshot (https://imgur.com/a/afSNX22) that the Digital Ocean API r...
    Accepted Answer: The lamp-18-04 image needed to be rebuilt. It is live now.
    2 By razorx Ubuntu 18.04 Ubuntu 20.04 LAMP Stack
  • Question

    Can't reach my Node.js application

    Hello world! I've created a Ubuntu NodeJS 8.10.0 on 18.04 droplet. I've deployed a Node.js app, tested on my computer. I can reach my app from inside the Droplet. curl http://localhost:3000 I can't reach my app from ...
    Accepted Answer: Greetings! I would bet that your application is listening on 127.0.0.1, as opposed to the public interface. If you run netstat -tulpn you should see the applications listening, and it might look something like this: ...
    2 By juliojordan Node.js Ubuntu 18.04
  • Question

    LAMP php mail only sending to gmail

    I have a droplet setup using the LAMP by DigitalOcean OS Ubuntu 18.04 framework (which includes Postfix), and in testing out the php mail() function, I find that sending or cc'ing email to a Gmail address works perfec...
    Accepted Answer: OK, so I configured Postfix to use my Gmail account as my SMTP server and all is good now. Still not sure why the email wasn't showing up in my inboxes before, but they are now! Hope this helps someone...
    1 By g3logic Ubuntu 18.04 PHP
  • Question

    Restore the server with the button inside the droplet configuration and now the apache, mysql and ssh services do not start

    One day I needed to restore the server due to a problem that occurred with the wordpress that I had installed that was disabled and needed a quick solution. I gave him the option to restore from the droplet control pa...
    Accepted Answer: Assuming you’re on Ubuntu, systemctl enable apache2 mysql Link for references. https://linuxconfig.org/how-to-start-service-on-boot-on-ubuntu-20-04 Ps: MySQL is dead, I highly recommend using mariadb instead. All MyS...
    2 By stiven8as Ubuntu 18.04 PHP WordPress Backups