Home>Article>Operation and Maintenance> How to set up multi-port access for nginx
How to set up multi-port access on nginx?
First find the path to default.conf corresponding to nginx, and then use the remote tool, I use wincp, to open the corresponding path, copy a conf path, and rename it.
Configure the external and internal ports: Then open port 8082 on the firewall, restart the firewall, close nginx, and start nginx. There are specific instructions in the cited article. Order. At this time, it may not be finished, and ngnix may not be started.
At this time, you need to re-execute the command in the article: yum install policycoreutils-pythonsudo cat /var/log/ audit/audit.log | grep nginx | grep denied | audit2allow -M mynginxsudo semodule -i mynginx.pp.
Modify the main configuration file: Just change one place: Add the virtual host configuration file directory you want to reference in the http module: Under /etc/nginx/ Create a vhosts folder specifically to place the website's configuration files.
#After the virtual machine configuration file is configured, you need to add the above domain name under the hosts file under Linux, otherwise you will still access the external network.
If we want to access the website under Linux in the virtual machine under Windows, we must also configure the hosts file under Windows, and all domain names point to the Linux server.
For more Nginx related technical articles, please visit theNginx Usage Tutorialcolumn to learn!
The above is the detailed content of How to set up multi-port access for nginx. For more information, please follow other related articles on the PHP Chinese website!