Installation and deployment of Nginx in Ubuntu

image.png

introduction###

Perfect is a complete and powerful toolbox, framework and application server for Linux, iOS and MacOS (OS X). It provides everything that Swift engineers need to develop lightweight, maintainable, and extensible applications and other REST services for the Swift programming language for client and server-side applications.
In the next few articles I will record the Perfect framework. Those interested can see:
Swift Perfect-Ubuntu server deploymentSwift Perfect-Qiniu upload files[Swift Perfect-iOS Message Push (APNs) to obtain APNs authorization code] (https://www.jianshu.com/p/3058d80761e8)Swift Perfect-Run in the background using the systemd command server projectInstallation and deployment of Nginx in Ubuntu environmentSwift Perfect-Nginx configure HTTPS server

Nginx installation####

sudo apt-get install nginx

The default server configuration is port 80. If you don’t have other Web Servers running, you should see Welcome to nginx!

Nginx modify configuration file:

vi /etc/nginx/nginx.conf

Find the http {... } area and add the following server configuration:

server {
 listen 80;
 server_name www.domain.com; # www.domain.com domain
 location /{
  proxy_pass http://localhost:8080; #Corresponding to port number 8080}}

E.g:

http {
  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;
  keepalive_timeout 65;
  types_hash_max_size 2048;
  # server_tokens off;

  server {
    listen 80;
    server_name www.domain.com;
    location /{
      proxy_pass http://localhost:8080;}}}
Test whether the configuration is correct:

nginx -t -c /etc/nginx/nginx.conf

image.png

Restart the Nginx server for the configuration to take effect:

/etc/init.d/nginx restart

image.png

Browser access www.domain.com domain name test shows Welcome to nginx!

Recommended Posts

Installation and deployment of Nginx in Ubuntu
ubuntu Docker installation and deployment of Rancher
Installation, configuration and uninstallation of GitLab in Ubuntu19.1
Installation and use of SSH in Ubuntu environment
Installation and use of GDAL in Python under Ubuntu
Installation and simple practice of MySQL in ubuntu environment (1)
Happy installation of Jenkins in ubuntu
Centos6.5 installation and deployment of KVM
Nginx installation and configuration load (ubuntu12.04)
Ubuntu installation and deployment Redash operation notes (2020.08)
Centos-6.5 installation and deployment of LNMP environment
Centos7 installation and deployment of gitlab server
Installation and uninstallation of CUDA under Ubuntu 16.04
Installation and use of Win10 subsystem Ubuntu
Centos7 installation and deployment of Airflow detailed
Detailed explanation of the installation and use of SSH in the Ubuntu environment
Ubuntu introduction and installation
Installation and configuration of JDK in CentOS 7 system
Production environment deployment of ubuntu Django + Uwsgi + Nginx
Installation of pulseaudio and API usage under Ubuntu 12.04
Centos7 installation of PHP and Nginx tutorial detailed
Installation and configuration of CentOS 7 in VMware Workstation
Use of Anaconda in Ubuntu
Ubuntu16.04 installation and simple configuration
Ubuntu deployment and experience Nexus3
Installation and usage instructions of rz/sz command under ubuntu
Ubuntu PostgreSQL installation and configuration
CentOS7 installation and maintenance of nginx from entry to master
How to compile and install PHP and Nginx in Ubuntu environment
Centos8 minimal deployment and installation of OpenStack Ussuri detailed tutorial
Centos7 installation and configuration of Jenkins
Installation of deb package under Ubuntu
Install and configure Docker in Ubuntu
Redis installation under ubuntu and windows
Installation instructions for gitlab in Ubuntu
Ubuntu 19.1 installation and configuration Chinese environment
Installation of Docker CE under Ubuntu
Configuration and beautification after Ubuntu installation (1)
CentOs7 installation and deployment Zabbix3.4 original
2-Kubernetes entry manual installation and deployment
Ubuntu18.04 installation Anaconda3 and VSCode guide
Coexistence of CUDA8.0 and CUDA9.0 under Ubuntu 16.04
Erlang 20.2 installation and deployment under CentOS 7
Ubuntu configuration source and installation software
JumpServer Bastion Host--CentOS 8 Installation and Deployment (4)
Common exceptions and solutions in the use and development of Ubuntu system
Detailed explanation of quick installation and configuration of Subversion (SVN) under Ubuntu
Ubuntu basic settings: introduction to the installation and use of openssh-server
FreeFileSync: Compare and synchronize files in Ubuntu
Installation and use of Mysql under CentOS
MySQL 8.0 installation, deployment and configuration under CentOS 6/7
Ubuntu18.04 system installation and prerequisite software installation guide
Installation and configuration of redis under centos7
Ubuntu18.04 Server version installation and use (graphic)
The implementation of the Ubuntu18.04 installation Pycharm tutorial
Zabbix installation and deployment and localization under CentOS
Ubuntu install PHP and PHP Nginx configuration method
Deploy Docker and configure Nginx in CentOS
Jenkins installation and deployment tutorial under CentOS 7
Python and scrapy deployment in centos environment
Deploy python3 and nginx projects on ubuntu18.04