glogal-cdn-5515.conf


    server {
        listen   5515;
        server_name localhost,127.0.0.1;

        #underscores_in_headers on;
        #charset koi8-r;

        #access_log  logs/host.access.log  main;
        root /opt/oss;

         location / {

            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
            add_header Access-Control-Allow-Methods "GET, POST, OPTIONS,PUT,DELETE";
            try_files $uri $uri/ @router;
            index  index.html index.htm;
         }

        location @router {
            rewrite ^.*$ /index.html last;
        }
    }

vim /opt/lib/nginx/nginx-1.25.1/conf/vhost/glogal-cdn-5515.conf

启动命令

https://doc.rg1008.com/docs/rg_dev/rg_dev-1eukff6a463vc

/opt/lib/nginx/nginx-1.25.1/sbin/nginx -s reload
通过端口查看nginx是否启动

ps -ef | grep nginx

netstat -lanp | grep "5515"
cd  /opt/oss ll
文档更新时间: 2023-08-26 10:59   作者:admin