修改nginx默认web目录的求助

修改nginx默认web目录的求助


千巷猫影
浏览 645回答 1
1回答

慕的地8271018

默认网站根目录为/usr/local/nginx/html,要将它改成/homw/wwwvi /usr/local/nginx/conf/nginx.conf将其中的location / {root html;index index.php index.html index.htm;}改为location / {root /home/www;index index.php index.html index.htm;}然后再将location ~ \.php$ {root html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}改为location ~ \.php$ {root /home/www;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}然后重启nginx已经安装了samba,所以要将vi /etc/samba/smb.conf中的[public]下的path值改为path = /home/www/
打开App,查看更多内容
随时随地看视频慕课网APP