配置nginx
打开conf文件进行编辑:
sudo nano /etc/nginx/nginx.conf
在http块内添加:
server { listen 80; server_name xxx.your_domain.com; root /root/work/your_web_folder; index index.html; }
重启nginx:
sudo service nginx restart
如果访问时出现403错误,请设置权限后再重启nginx:
sudo chmod -R 777 /root sudo chmod -R 777 /root/work/ sudo chmod -R 777 /root/work/your_web_folder
参考:
https://www.linuxprobe.com/nginx-403-forbidden.html
https://mincong.io/cn/nginx-subdomains/
标签:777,网页,sudo,chmod,nginx,Linux,root,your From: https://www.cnblogs.com/johnnyzhao/p/18025538