apache2.2 反向代理 配置css js静态文件

html-css012

apache2.2 反向代理 配置css js静态文件,第1张

1.先去掉下面两行的注释

LoadModule proxy_module

modules/mod_proxy.so

LoadModule proxy_http_module

modules/mod_proxy_http.so

2.然后在最后增加

ProxyPass /images !

ProxyPass /css !

ProxyPass /js !

ProxyPass / http://localhost:8080/这个也可以写为:

ProxyPass

/oa

http://localhost:8080/oa

ProxyPassReverse

/oa

http://localhost:8080/oa

也可以连续增加以上两行,就是多个tomcat启动

ProxyPass /meb http://192.168.6.103:8081/meb

ProxyPassReverse /meb http://192.168.6.103:8081/meb

对于新版本的vue,需要新增vue.config.js,并添加如下配置,产生的效果是一样的

其实用 相对路径 来解决这个问题不是最好的方案,甚至 vue-cli4.x 之后,就不支持将 publicPath 设置为 ./ 了。

看了 公司的项目 及 Nuxt框架 的推荐,均是推荐使用绝对路径来设置 publicPath

您好,nginx服务器SSL证书配置如下,请你自查,下面是用的沃通SSL测试证书,你可要申请沃通免费SSL证书用。

打开 Nginx 安装目录下 conf 目录中的 nginx.conf 文件找到

# HTTPS server

#

#server {

# listen 443

# server_name localhost

# ssl on

# ssl_certificate cert.pem

# ssl_certificate_key cert.key

# ssl_session_timeout 5m

# ssl_protocols SSLv2 SSLv3 TLSv1

# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP

# ssl_prefer_server_ciphers on

# location / {

# root html

# index index.html index.htm

# }

#}

将其修改为 :

server {

listen 443

server_name localhost

ssl on

ssl_certificate sslkey/wosign.com.crt(证书公钥)

ssl_certificate_key sslkey/wosign.com.key(证书私钥)

ssl_session_timeout 5m

ssl_protocols TLSv1 TLSv1.1 TLSv1.2

ssl_ciphers ALL:!ADH:!EXPORT56:-RC4+RSA:+HIGH:+MEDIUM:!EXP

ssl_prefer_server_ciphers on

location / {

root html

index index.html index.htm

}

}

保存退出,并重启 Nginx。通过 https 方式访问您的站点,测试站点证书的安装配置。