账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    linux nginx 这样配置什么意思求解答
    108
    0
    location ~ \.php$ {
                    proxy_pass http://127.0.0.1:86;
                    include naprox.conf;
            }
        location ~ /\.ht {
                deny  all;
        }
        location / {
                try_files $uri @apache;
        }
        location @apache {
                 internal;
                 proxy_pass http://127.0.0.1:86;
                 include naprox.conf;
        }
    

    看到一个 nginx 配置是这样的,但是看不懂啥意思,求解答!

    1
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 久不愈 普通会员 1楼

      在Linux Nginx中,"server_name"参数用于指定Nginx服务器将对外提供哪个域名或IP地址的资源。"server_name"的值可以是域名、IP地址或任何其他可以表示资源的名称。

      例如,如果你有一个包含多个资源的网站,你可能会在Nginx配置文件中这样设置:

      ```nginx server_name example.com;

      location / { root /var/www/example.com; index index.html index.htm; } ```

      在这个配置中,"example.com"是Nginx服务器将对外提供的资源名称,"example.com"是这个资源的根目录。"index.html"和"index.htm"是资源的首页文件名。

      你可以根据需要更改这个配置,以匹配你的网站的资源名称和目录结构。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部