Skip to content

Instantly share code, notes, and snippets.

@holyzfy
Last active December 9, 2016 03:16
Show Gist options
  • Save holyzfy/0380ecc81a48c59cdc913f01f2ab5e89 to your computer and use it in GitHub Desktop.
Save holyzfy/0380ecc81a48c59cdc913f01f2ab5e89 to your computer and use it in GitHub Desktop.
start nginx

nginx.conf

在http配置项里增加

include vhost/*.conf;

vhost/f2e.conf

server {
    listen                 8021;
    server_name            localhost 127.0.0.1;
    root                   D:/f2e;
    ssi                    on;
    autoindex              on;
    index                  off;
    expires                 -1;
    access_log             'D:/Program Files/nginx/logs/f2e_nginx_access.log';
    error_log              'D:/Program Files/nginx/logs/f2e_nginx_error.log';
    add_header Access-Control-Allow-Origin '*';
    add_header Access-Control-Allow-Methods 'POST, GET, OPTIONS';
}

启动

'd:/Program Files/nginx/nginx.exe' -p 'd:/Program Files/nginx'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment