V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
eightqueen
V2EX  ›  iDev

mac 下 nginx 是在哪里配置默认根路径的?

  •  
  •   eightqueen · 2016-06-09 14:40:03 +08:00 · 9053 次点击
    这是一个创建于 2888 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我用 brew 装的,查看 nginx.conf 没有看到 root 的配置,奇怪了, debian 系统下明明有啊。
    7 条回复    2016-06-14 10:39:58 +08:00
    Magician
        1
    Magician  
       2016-06-09 15:15:40 +08:00 via iPhone
    /usr/local/etc/nginx/conf.d/手动配置
    eightqueen
        2
    eightqueen  
    OP
       2016-06-09 21:18:13 +08:00
    @Magician 根本就没有 conf.d 目录
    tianice
        3
    tianice  
       2016-06-09 22:24:47 +08:00
    先确认看的 nginx.conf 是不是对。 nginx -t 可以查看。没有 root 配置是什么意思?不写也是有默认值的
    eightqueen
        4
    eightqueen  
    OP
       2016-06-09 22:56:45 +08:00   ❤️ 1
    去国外的网站查了一下,终于搞明白了,国内的还是不靠谱。
    应该去修改 /usr/local/Cellar/nginx/[version]/html
    livelazily
        5
    livelazily  
       2016-06-10 00:19:09 +08:00
    @eightqueen brew inof nginx 就有说明:
    ==> Caveats
    Docroot is: /usr/local/var/www

    The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
    nginx can run without sudo.

    nginx will load all files in /usr/local/etc/nginx/servers/.

    To have launchd start nginx now and restart at login:
    brew services start nginx
    Or, if you don't want/need a background service you can just run:
    nginx
    ryd994
        6
    ryd994  
       2016-06-10 02:07:31 +08:00
    nginx -V 看编译参数
    包括配置文件路径和默认 root 都有
    leefly
        7
    leefly  
       2016-06-14 10:39:58 +08:00
    同 5 楼, brew info nginx 之后和 nginx 相关的信息都有了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1515 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:01 · PVG 01:01 · LAX 10:01 · JFK 13:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.