![]() Nginx configuration is done and we will confirm the status using “ nginx -t” which would return test status as successful. But if you are planning to host your website, this will be the root folder where you host your website. Ln -s /etc/nginx/sites-available/nf /etc/nginx/sites-enabled/nfĥ.) We now create an index file under /var/So it looks like : /var/This file helps to check if our routing is working or not. We will unlink the default conf file and link nf file to the sites-enabled using the below commands : unlink /etc/nginx/sites-enabled/default Since we have created nf file as part of our configuration, we want Nginx to refer to this file whenever we browse the site. ![]() We are basically telling Nginx to listen on port 80 and the www location is grafana folder under html : Now the file location is : /etc/nginx/sites-available/nf and the file contents are as below. You can name it anything, I created a file named nf for my simplicity. Go to /etc/nginx/sites-available/ folder and create a conf file. This is where we are setting up a reverse proxy so that letsencrypt let’s us create the encryption keys in our next steps. Create nf file under Nginx configuration ( sites-available). Sudo systemctl enable rviceĤ.) In this step we configure Nginx to route our traffic to the index file that we will create in step 5. Sudo apt-get install -y grafana-enterprise Sudo apt-get install -y software-properties-common wgetĮcho "deb stable main" | sudo tee -a /etc/apt//grafana.listĮcho "deb beta main" | sudo tee -a /etc/apt//grafana.list Sudo apt-get install -y apt-transport-https I am sharing the steps to install Grafana as well if you want to follow along: #NGINX installation You can also install the application that you are planning to host on this machine. You also need to add an inbound NSG rule to allow communication on ports 80 and 443.ģ.) Login to this machine using FQDN we just assigned and install all the required packages such as Nginx and Let’s Encrypt. I assigned “.com” in my case and will use it throughout this demo. You can install any other application based on your requirement.ġ.) The first step is to create a machine on Azure using: Create a Linux VM in the Azure portal.Ģ.) The second step is to assign an FQDN to the virtual machine created in the first step using Create FQDN for a VM in the Azure portal. In this demo, I will install Grafana and let my users access Grafana securely.You want to configure any application on Azure VM and use the URL for accessing this application securely, this is the most common scenario where you can host Jenkins, Grafana, etc, and allow your users to access this securely.You don’t want to purchase a domain and use the Azure custom domain available.You want to host a static website securely on Azure and want full control on hosting.Allow communication at ports 80 and 443 for generating SSL, we will later change this to allow connection only at port 443.In this tutorial, I am working with the Ubuntu machine. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |