Solution where nginx proxy port 80 does not take effect
If your Nginx agent is configured with port 80 and still displays the default Nginx page when accessed, it may be due to the following reasons:
Default site configuration: By default, Nginx creates a default site profile during installation, which listens on port 80 and displays a default welcome page. If your proxy configuration does not take effect, it may be because the default site profile takes precedence over your proxy profile. You can try removing or disabling the default site profile to ensure that the proxy configuration takes effect.
The default site configuration file path may be/etc/nginx/sites - enabled/default or/etc/nginx/conf. D/default. Conf, specific path depends on your operating system and way of nginx configuration. You can use the following command to find the default site profile:
ls /etc/nginx/sites-enabled/ ls /etc/nginx/conf.d/ If the default site configuration file is found, it can be backed up and removed (or disabled) using the following command: ````shell sudo mv /etc/nginx/sites-enabled/default /etc/nginx/sites-enabled/default.backup sudo mv / etc/nginx/conf. D/default conf/etc/nginx/conf. D/default. Conf. Backup ` ` ` then reload nginx configuration file: ````shell sudo systemctl reload nginx This ensures that the proxy configuration takes effect and overrides the default site configuration.
- Proxy path configuration:
If your proxy configuration takes effect, but other paths to access the proxy (e.g/aaa
A 404 error may be caused by an incorrect proxy path configuration. Please check your proxy profile to make sure that inlocation
The path and target server of the proxy are correctly configured in the block. For example:
server { listen 80; server_name example.com; location / { proxy_pass http://backend_server; In the example above, the 'proxy_pass' directive brokers the request to a backend server named 'backend_server'. Make sure your proxy is configured correctly and that you specify the correct path and target server in the 'location' block. If your proxy path is' /aaa ', then your configuration should look something like: ````nginx server {listen 80; server_name example.com; location /aaa { proxy_pass http://backend_server; Make sure to reload the Nginx configuration file for the changes to take effect.
Nginx version issue: You mentioned that you are using Nginx version 1.23.0. Make sure the version you are using supports the features you need and has no known issues. Sometimes, a particular version of Nginx may have a bug or behavior change that may cause the agent to be configured improperly. You can consult Nginx's official documentation, release notes, or community forums to learn about issues and workaround related to the particular version you're using.
Hopefully, the above solution will help you solve the problem with Nginx proxy port 80. If the problem persists, please provide more details, such as the contents of the Nginx configuration file and the relevant entry of the error log, for further analysis and to help you resolve the problem.
To this article about the nginx agent 80 port does not take effect of the solution is introduced to this article, more related to nginx 80 port does not take effect content please search the script home previous articles or continue to browse the following related articles hope that you will support the script home in the future!
- Nginx startup failure caused by httpd occupying port 80 Solution
- Nginx modifies default port 80 (to resolve port conflicts with Tomcat)
- How to Configure Multiple Nginx services to Share Port 80 for domain name resolution
- Nginx enables port 80 to access 8080 and resolve project names and addresses
- nginx solution for configuring multiple sites to share port 80
Related article
-
Server nginx permission denied resolve case
This article mainly introduces the case that the server nginx permission was refused to solve. Friends in need can use it for reference. I hope it can be helpful2022-09-09 -
nginx+tomcat to achieve the Windows system load balancing tutorial
The following Xiaobian for everyone to share a nginx+tomcat to achieve the load balancing tutorial under the Windows system, with a good reference value, I hope to help you2017-12-12 -
Resolve error that Nginx returns 404 after configuring proxy_pass
This article mainly introduces the Nginx configuration proxy_pass return 404 problem, this article gives you a very detailed introduction, for everyone's study or work has a certain reference value, need friends can refer to2021-01-01 -
nginx reports the connect() failed(111: Connection refus) error
This article introduces the nginx error connect() failed(111: Connection refused)while connecting to upstream solution, the article through the example code is very detailed, for everyone's study or work has a certain reference learning value, the need for friends to study together with the Xiaobian below2023-06-06 -
Nginx Example of configuring multiple SSL certificates with a single IP address
This article mainly introduces the Nginx single IP address configuration of multiple SSL certificate method example, Xiaobian feel very good, now share with you, also give you a reference. Let's take a look2018-11-11 -
Linux Nginx anti-theft chain and optimized implementation code
Today is the weekend Xiaobian on duty ha, very open, work makes me happy, this article focuses on introducing Linux Nginx anti-theft chain and optimization problems and implementation code, need friends to follow Xiaobian to see it2021-06-06 -
The whole process of configuring proxy protocol in nginx
proxy protocol is an Internet protocol, by adding a small header to tcp, to facilitate the transfer of client information, in complex network conditions and need to obtain the user's real IP is very useful, this article mainly introduces the configuration of proxy in nginx protocol Protocol related information, need friends can refer to2022-04-04 -
Solution to losing nginx.pid after restarting or killing the nginx process
After restarting or killing the nginx process, the nginx.pid file is lost, causing nginx to fail to start normally. Here is the solution2014-01-01 -
How to configure SSL on the Nginx server
This article mainly introduces the configuration method of enabling SSL in Ningx server, the premise of this article is that OpenSSL has been installed under the Linux system, the need of friends can refer to it2015-08-08 -
nginx configuration service startup tutorial details
This article gives you a detailed introduction to the relevant knowledge of nginx configuration service startup, very good, has a certain reference value, interested friends follow the script home Xiaobian together to learn it2018-05-05
Latest comments