[root@localhost ~]# vi /home/software/nexus/nexus-2.14.3-02/conf/nexus.properties 修改: nexus-webapp-context-path=/nexus 为: nexus-webapp-context-path=/
重启nexus服务。
nginx反向代理:
upstream nexus_server { server localhost:8083; } server { listen 80; server_name nexus.xxx.com; # individual nginx logs for this web vhost #access_log /var/log/nginx/crm-web/access.log; error_log /var/log/nginx/nexus.xxx.com_error.log; location / { proxy_pass http://nexus_server; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; } }
这样访问nexus时访问http://nexus.xxx.com即可,不需要加http://nexus.xxx.com/nexus了
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/3712.html