nginx部署多个vue项目的方法

阅读数:88 评论数:0

跳转到新版页面

分类

应用软件

正文

使用不同的端口

server {
    listen       8088;
    server_name  localhost;
    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;
 
    location /  {
        root   /usr/share/nginx/student;
        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   /usr/share/nginx/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;
    #}
}

 




相关推荐

配置文件中,http区段中插入&ldquo;server_tokens&nbsp;&nbsp;off;&rdquo;,重新载入配置文件 <pre cla

原因是在nginx配置文件中配置upstream时用了&ldquo;_&rdquo;字符,如上用的tomcat_server,直接报错了。改成tomcatserver,即不使用&ldquo;_&

gzip on; #开启gzip gzip_vary on; gzip_min_length 1k; #

原因是: &nbsp; &nbsp; if 和

方案一:在proxy_pass后面加根路径 / upstream one { server localhost:

server { listen 80; server_name localhost;

相关名词 1、nginx 一个高性能web-server和实施反向代理的软件。 2、lvs Linux Virtual Server,

map $http_upgrade $connection_upgrade { default upgrade;

<tr style=

一、nodejs插件 <img src="h