Home>Article>Operation and Maintenance> How to configure file path in nginx
After the Nginx installation is completed, the default installation location of yum is /etc/nginx middle. The configuration file is located at: /etc/nginx/nginx.conf. You can modify the number of processors, log path, pid file path, etc., and the default log.
错误日志 /var/log/nginx/error.log 访问日志 /var/log/nginx/access.log
The include /etc/nginx/conf.d/.conf at the end of nginx.conf means to include the user Put your own configuration in conf.d/*
Modify the default server configuration, including the listening port listen and file directory root
$ vi /etc/nginx/conf.d/default.conf
Change Nginx’s default Change the access path to /data/www/html, change the listening port listen to 8888 (or 80, whichever you want), start Nginx,
$ /etc/init.d/nginx start
After modifying the nginx configuration, you can restart it without affecting use. Start Nginx,
$ /etc/init.d/nginx reload
For more Nginx related knowledge, please visit theNginx Usage Tutorialcolumn!
The above is the detailed content of How to configure file path in nginx. For more information, please follow other related articles on the PHP Chinese website!