1. 程式人生 > >windows下nginx代理ftp服務器

windows下nginx代理ftp服務器

重新 nginx lis cnblogs ftp服務器 ons eth onf blog

我所在的開發環境裏,nginx和ftp在同一臺服務器。

ftp根目錄:

技術分享圖片

nginx的配置:

在nginx.conf中加入:

    server {
        listen 9090;
        server_name localhost;
        location / {
            root C:/FTPRoot;
            index *.*;
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Headers X-Requested-With;
            add_header Access
-Control-Allow-Methods GET,POST,OPTIONS; } }

然後重新加載配置文件即可,參考:https://www.cnblogs.com/qianzf/p/6809427.html。

windows下nginx代理ftp服務器