群晖 Web Station 设置伪静态

2021-03-06 Views 黑群晖

执行 cat /etc/nginx/app.d/server.webstation-vhost.conf
找到对应http端口:

   server{
        listen   7777 default_server; 
        #端口对应处
        listen   [::]7777 default_serve;
        ....
        ....
        root    "/volume1/root/xxxxxx" 
        #网站对应目录
        ....
        ....
        include /usr/local/etc/nginx/conf.d/xxxxxxxxxxxxxxxxxxxxxxxxxxx/user.conf*
        #Ngnix配置文件位置(xxxx为随机值)
    }

记录 include /usr/local/etc/nginx/conf.d/xxxxxxxxxxxxxxxxxxxxxxxxxxx/user.conf*
创建Ngnix配置文件:cd /usr/local/etc/nginx/conf.d/
查看所有目录:ls
找到对应随机值的目录进入:cd xxxxxxxxxxxxxxxxxxxxxxxxxxx/ (xxxx为随机值)
创建配置文件:sudo vi user.conf.dir
输入 i 编辑,Esc退出编辑,:wq 保存!
重启web:sudo nginx -s reload