Configurations for Nginx (Reverse Proxy Server)
Nginx service in Ubuntu server is used as a reverse proxy for connecting the hosts in vcenter server 7
Installing Nginx Server
sudo apt-get update
sudo apt-get install nginx
sudo nginx -v
Configurations in Nginx Server
Navigate to Nginx folder path and create the SSL key using the below command
cd /etc/nginx
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/cert.key -out /etc/nginx/cert.crt
Edit the default configuration file using the command
sudo nano /etc/nginx/sites-enabled/default
Type the below in the configuration file replace the domain name with the server IP address or server name.
Save the edited configuration file
Let's now test the configuration file using command
sudo nginx -t
. When the test was successful, we will see the test is successfull message. When the test was a failure check the configuration file for syntax errors and resolve it to pass the test.Restart the Nginx server using the command
sudo service nginx restart
Important Files:
Nginx Configuration file:
/etc/nginx/nginx.conf
Proxy Configuration file:
/etc/nginx/sites-enabled/default
Access Logs:
/var/log/nginx/access.log
Error Logs:
/var/log/nginx/error.log
Last updated