This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_http [2022/09/25 09:58] val [NGINX] |
сервис_http [2022/09/25 20:14] val [NGINX] |
||
---|---|---|---|
Line 894: | Line 894: | ||
# ln -s /etc/nginx/sites-available/myapp1 /etc/nginx/sites-enabled/myapp1 | # ln -s /etc/nginx/sites-available/myapp1 /etc/nginx/sites-enabled/myapp1 | ||
</code><code> | </code><code> | ||
- | root@gate.corp13.un:~# cat /var/opt/gitlab/nginx/conf/my.conf | + | root@server# cat /var/opt/gitlab/nginx/conf/my.conf |
- | </code><code> | + | |
- | upstream myapp1 { | + | |
- | server node1:30111; | + | |
- | server node2:30111; | + | |
- | server node3:30111; | + | |
- | } | + | |
server { | server { | ||
- | listen 85; | + | listen 80; |
- | server_name webd.corp13.un; | + | server_name webd.corpX.un; |
location / { | location / { | ||
- | proxy_pass http://myapp1; | + | proxy_pass http://192.168.49.2:30111; |
} | } | ||
} | } | ||
+ | |||
+ | </code><code> | ||
+ | root@server# cat /var/opt/gitlab/nginx/conf/nginx.conf | ||
+ | </code><code> | ||
+ | ... | ||
+ | include /var/opt/gitlab/nginx/conf/my.conf; | ||
+ | } | ||
</code><code> | </code><code> | ||
- | root@gate.corp13.un:~# /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx -t | + | root@server# /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx -t |
</code><code> | </code><code> | ||
- | root@gate.corp13.un:~# gitlab-ctl restart nginx | + | root@server# gitlab-ctl restart nginx |
</code> | </code> |