Install nginx on ubuntu to configure the reverse proxy server, and use tung.pdf
Install nginx:
sudo apt-get install nginx
Start nginx;
sudo service nginx start
If the following error is reported:
[alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)2015/01/16 15:55:46[warn] 1973#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1nginx: the configuration file /etc/nginx/nginx.conf syntax is ok2015/01/16 15:55:46 [emerg] 1973#0: open() "/var/run/nginx.pid" failed (13: Permission denied)nginx: configuration file /etc/nginx/nginx.conf test failed
In this case, either the file is not created or the file is not authorized. Therefore:
Use touch and mkdir to create files and folders. Then, grant all permissions (777) to all users in the sudo chmod a + rwx-R file path ).
Add the following content to the http file in the nginx. conf file:
Upstream myproject (intranet ing address alias) {server 192.168.0.27: 80 (ip: port);} server {listen 8088; server_name localhost; location/{root html; index index.html index.htm; proxy_pass http: // myproject (intranet ing address alias );}}Now, run the service nginx start command to start the server. Then enter http: // localhost: 8088 to check whether the request is successful.