User Tools

Site Tools


сервис_http

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
сервис_http [2022/09/26 05:29]
val [NGINX]
сервис_http [2022/09/26 06:19]
val [NGINX]
Line 851: Line 851:
 <​code>​ <​code>​
 gate# apt install nginx gate# apt install nginx
 +</​code>​ 
 +==== Прокси "​красивого"​ URL в приложение (пример 1) ==== 
 +<​code>​
 gate# cat /​etc/​nginx/​sites-available/​user1 gate# cat /​etc/​nginx/​sites-available/​user1
 </​code><​code>​ </​code><​code>​
Line 865: Line 867:
  
 # service nginx configtest # service nginx configtest
-# tail /​var/​log/​nginx/​error.log 
  
 +# tail /​var/​log/​nginx/​error.log
   или   или
- 
 # nginx -t -c /​etc/​nginx/​nginx.conf # nginx -t -c /​etc/​nginx/​nginx.conf
- 
  
 # service nginx restart # service nginx restart
 </​code><​code>​ </​code><​code>​
 gate.isp.un$ wget -O - -q http://​server.corpX.un gate.isp.un$ wget -O - -q http://​server.corpX.un
-</​code><​code>​+</​code>​ 
 + 
 +==== Прокси с балансировкой (пример 2) ==== 
 + 
 +<​code>​
 # cat /​etc/​nginx/​sites-available/​myapp1 # cat /​etc/​nginx/​sites-available/​myapp1
 </​code><​code>​ </​code><​code>​
Line 893: Line 897:
 </​code><​code>​ </​code><​code>​
 # 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>​ 
 + 
 +==== Прокси "​красивого"​ URL в приложение (пример 3) ==== 
 + 
 +<​code>​ 
 +# host mail 
 +mail.corpX.un is an alias for server.corpX.un. 
 +server.corpX.un has address 192.168.X.10 
 + 
 +# host webd 
 +webd.corpX.un has address 192.168.X.10 
 root@server#​ cat /​var/​opt/​gitlab/​nginx/​conf/​my.conf root@server#​ cat /​var/​opt/​gitlab/​nginx/​conf/​my.conf
-root@server.corp13.un:​~#​ cat /var/​opt/​gitlab/​nginx/​conf/​my.conf+</code><​code>​
     server {     server {
         listen 80;         listen 80;
сервис_http.txt · Last modified: 2022/10/06 10:01 by val