关于查看nginx安装路径,如何查看nginx的安装路径这个很多人还不知道,今天小篇来为大家解答以上的问题,现在让我们一起来看看吧!

1、nginx的根目录在/usr/share/nginx/html/下。

2、# :wq! #保存并退出 重启nginx # serv nginx restart 即可修改成功!# vi /etc/nginx/conf.d/default.conf## The default server#server {listen 80;server_name localhost;root /va$1r/www; #修改新的目录为var下的www目录#charset koi8-r;#access_log logs/host.access.log main;location / {root /var/www;index index.html index.htm index.php index.phtml; #添加index.php和index.phtml# example#ModSecurityEnabled on;#ModSecurityConfig /etc/nginx/modsecurity.conf;}error_page 404 /404.html;location = /404.html {root /var/www; #修改新的目录文件}# redirect server error pages to the static page /50x.htmllocation = /50x.html {root /var/www; #修改新的目录文件}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ .php$ {#location ~ .php$ {# proxy_pass ;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000root /var/www; #修改新的目录文件fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;include fastcgi_params;}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /.ht {# deny all;#}}。

本文到这结束,希望上面文章对大家有所帮助。