обращение к proxy_pass на адрес 123.com открывается imail.123.com . Что я сделал не так ?
cat /etc/nginx/sites-available/proxy.conf
## SITE
##################################
# WORDPRESS NGINX CONFIGURATIONS
##################################
server {
listen 127.0.0.1:80;
root /var/www/wordpress/;
server_name 123.com;
access_log /var/log/nginx/wp_client_access.log;
error_log /var/log/nginx/wp_client_error.log;
return 301 https://123.com$request_uri;
}
server {
listen 127.0.0.1:443 ssl;
server_name 123.com;
root /var/www/wordpress;
access_log /var/log/nginx/123.com.log;
error_log /var/log/nginx/123.com.error.log;
ssl on;
ssl_certificate /etc/letsencrypt/live/123.com-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/123.com-0001/privkey.pem; # managed by Certbot
# ssl_trusted_certificate /etc/letsencrypt/live/123.com-0001/chain.pem;
#include snippets/ssl.conf;
# include snippets/letsencrypt.conf;#
# log files
# access_log /var/log/nginx/example.com.access.log;
# error_log /var/log/nginx/example.com.error.log;##
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires max;
log_not_found off;
}
}
###iMAIL
server {
listen 192.168.111.15:80;
server_name imail.123.com;
return 301 https://imail.123.com/SOGo$request_uri;
}
server {
listen 192.168.111.15:443 ssl ;
server_name imail.123.com;
access_log /var/log/nginx/imail.123.com.log;
error_log /var/log/nginx/imail.123.com.error.log;
ssl on;
ssl_certificate /etc/letsencrypt/live/imail.123.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/imail.123.com/privkey.pem;
ssl_stapling on;
ssl_stapling_verify on;
location ~ ^imail.123.com(.*)$ {
return 301 $scheme://imail.123.com/SOGo/$1;
}
location /SOGo {
add_header Front-End-Https on;
proxy_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 64;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://192.168.111.24;
# proxy_redirect http://192.168.111.24/SOGo;
}
}
###WIKI
server {
listen 192.168.111.15:80;
server_name wiki.123.com;
return 301 https://wiki.123.com$request_uri;
}
А где у тебя location / ?
Обсуждают сегодня