![]() Reload the configuration: sudo systemctl reload nginx Test the Nginx serverįrom a computer, open an Internet browser and enter the IP address or the name of the machine and verify that the Welcome to nginx! is displayed. When installing nginx from the official repository, the service is configured to run with the nginx user and php the Edit the /etc/nginx/nf file: sudo nano /etc/nginx/nf This configuration step is important, especially if you want to use php (php-fpm) on the web server. Show version of nginx nginx -v Configure the nginx user This command allows you to check the status of the service and since when it has been running. If all goes well the command returns nothingĬonfigure the automatic start of the service: sudo systemctl enable nginxĬheck the nginx service: systemctl status nginx Start the nginx service: sudo systemctl start nginx This command is very useful, especially when making a configuration change, it allows you to check that it is correct before reloading it. Nginx is now installed, we will now do some checks, configuration and see some commands before moving on to installing PHP.Ĭheck the configuration of nginx: sudo nginx -t The -y option allows you to not have a confirmation request for the installation Install nginx with the following command: sudo apt install nginx -y On the screenshot below, we can see that the nginx repository has been queried: Update packages with the command: sudo apt update You have to adapt the sources of the repository to the version of Ubuntu, in the tutorial I’m on version 18.04.X, so I’m using bionic.Īdd the signatures of the deposit using the following commands: wget Press the Crtl + X keyboard keys and save the changes. ![]() In the nano editor, enter the lines below which are the configuration of the repository: deb bionic nginx ![]() Install Nginxīefore installing it, we will add the Nginx office repository.Įnter the following command to create a list file where we will fill in the urls. In this part, we are going to install the various components of the Web server and check their correct functioning. Have a freshly installed and up to date Ubuntu server with root or sudo access and Internet access. In this tutorial, we will not use the official repositories of the distribution, but the repositories of the various components in order to install the latest versions. I’ll also explain how to put phpmyadmin to administer the MariaDB server and how to configure vhosts. In this tutorial, we will see how to install and configure a server in Ubuntu with the following components: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |