Enter /usr/local/nginx/conf sudo cd /usr/local/nginx/conf Create vhost directory sudo mkdir vhost Modify the nginx.conf file sudo cp nginx.conf nginx.conf_back sudo vim nginx.conf Set the hosts file of the access machine to simulate access. The machine I use here is Windows 10, and the hosts file is in the C:\Windows\System32\drivers\etc folder. Create a port proxy configuration file sudo cd vhost sudo vim www.jaydenmall.com.conf server { # Listen to port 80 listen 80; autoindex on; server_name www.jaydenmall.com; access_log /usr/local/nginx/logs/access.log combined; index index.html index.htm index.jsp index.php; if ( $query_string ~* ".*[\;'\<\>].*" ){ return 404; } location / { # Reverse proxy to port 8080 proxy_pass http://127.0.0.1:8080; add_header Access-Control-Allow-Origin *; } } Restart nginx sudo ../../sbin/nginx -s reload Errors may occur, in which case you need to use the nginx -c parameter to specify the location of the nginx.conf file. sudo killall -9 nginx # Kill nginx process sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf sudo ../../sbin/nginx -s reload # Restart The port reverse proxy is successful. Note that the red part is the default port 80, which actually points to port 8080 of Tomcat. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: MySQL 8.0 installation tutorial under Linux
>>: JavaScript to implement simple tab bar switching content bar
1. Function: xargs can convert the data separated...
Horizontal Line Use the <hr /> tag to draw ...
1. Use of CSS scope (style division) In Vue, make...
Table of contents 1. What content usually needs t...
Table of contents 1. Theory SERIALIZABLE REPEATAB...
<br />This article is mainly to let beginner...
First, a common question is, what is the relation...
Assume there is such an initial code: <!DOCTYP...
Effect display The built-in boot interface is too...
This article example shares the specific code of ...
This article shares the specific code of Vue to s...
There was an article about the execution process ...
1. Download, I take 8.0 as an example Download ad...
Table of contents 1. World Map 1. Install openlay...
float:left/right/none; 1. Same level floating (1)...