Direct access without 8080

Direct access method without 8080

problem

Generally, the websites we visit are all domain names without port numbers. How did he achieve it?

After purchasing the dns resolver and domain name, you need to add the port number to access the website you deployed
Insert picture description here

Solution

Map 80 of the system to port 8080

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

Insert picture description here
When starting the project again, it can be used without the port number
Insert picture description here

Published 20 original articles · Liked4 · Visits 820

Guess you like

Origin blog.csdn.net/weixin_43986850/article/details/105594962