本地启服务

一、用nginx

首先下载:http://nginx.org/

在config配置好


server {
        listen       8088;   // 需要配置默认80
        server_name  meimeibaii.cn;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;
        #配置hexo博客目录
        root /usr/local/hexo/public
        location / {   // 相对路径
            root   html;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

方法二、 控制面板 所有控制面板项 程序和功能 启动或关闭windows功能
internet -information-service

搜iis internet -information-service

点击网站 右击 添加网站

网站名称随便起

然后物理路径直接打开想要打开的项目

输入ip + 端口就可以打开了

猜你喜欢

转载自my.oschina.net/u/3608045/blog/1796393