Install Nginx:
sudo apt-get install Nginx
Start Nginx;
sudo service nginx start
If this 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/et C/nginx/nginx.conf:1nginx:the configuration file/etc/nginx/nginx.conf syntax is OK2015/01/16 15:55:46 [Emerg] 1973#0:o Pen () "/var/run/nginx.pid" failed (13:permission denied) nginx:configuration file/etc/nginx/nginx.conf test failed
Either the file is not created or the permission is not present. So:
Create files and folders with Touch and mkdir first. Then use the sudo chmod a+rwx-r file path to give all users all permissions (777).
Finally, under HTTP in the nginx.conf file, add
Upstream MyProject (address alias for the intranet map) {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 map address alias);}}
OK, now start the server with the service nginx Start command. Then enter http://localhost:8088 to see if it is successful.
Ubuntu Install nginx Configure reverse proxy server