Home > Operation and Maintenance > Nginx > How to use nginx to access local static resources on a linux server

How to use nginx to access local static resources on a linux server

WBOY
Release: 2023-05-19 19:46:04
forward
1816 people have browsed it

1. Check whether port 80 is occupied. Generally, port 80 is mostly occupied by the apache service.

netstat -anp|grep 80

2. Modify the port number of the apache service

vim /etc/apache2/ports.conf

How to use nginx to access local static resources on a linux server

3. Change the port number to 8080

4. Modify the nginx service configuration

vim /etc /nginx/conf.d/nginx.conf

How to use nginx to access local static resources on a linux server

5. Restart nginx service

service nginx restart

6. The page attempts to access local resources

How to use nginx to access local static resources on a linux server

#7. Access successful!

The above is the detailed content of How to use nginx to access local static resources on a linux server. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template