В общем я более не знаю чего еще копать.
В nginx два конфига:
[B]s1.conf[/B]
[B]ssl.s1.conf[/B]
[B]И конфиг httpd[/B]
[B]default.conf
[/B]
Если я правильно понимаю то nginx проксирует запросы на httpd изменяя заголовки.
Где взять инфо как правильно должны формироваться заголовки?
Может есть у кого рабочий конфиг?
В nginx два конфига:
[B]s1.conf[/B]
Скрытый текст |
---|
[COLOR=#000000]# Default website[/COLOR] [COLOR=#000000]server {[/COLOR] [COLOR=#000000]listen 80 default_server;[/COLOR] [COLOR=#000000]server_name _;[/COLOR] [COLOR=#000000]server_name_in_redirect off;[/COLOR] [COLOR=#000000]proxy_set_header X-Real-IP $remote_addr;[/COLOR] [COLOR=#000000]proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;[/COLOR] [COLOR=#000000]proxy_set_header Host $host:80;[/COLOR] [COLOR=#000000]set $proxyserver "[/COLOR][URL=http://127.0.0.1:8888/]http://127.0.0.1:8888"[/URL][COLOR=#000000];[/COLOR] [COLOR=#000000]set $docroot "/home/bitrix/www";[/COLOR] [COLOR=#000000]index index.php;[/COLOR] [COLOR=#000000]root /home/bitrix/www;[/COLOR] [COLOR=#000000]# Redirect to ssl if need[/COLOR] [COLOR=#000000]if (-f /home/bitrix/www/.htsecure) { rewrite ^(.*)$ [/COLOR][URL=https://%24host%241/]https://$host$1[/URL][COLOR=#000000] permanent; }[/COLOR] [COLOR=#000000]# Include parameters common to all websites[/COLOR] [COLOR=#000000]include bx/conf/bitrix.conf;[/COLOR] [COLOR=#000000]# Include server monitoring locations[/COLOR] [COLOR=#000000]include bx/server_monitor.conf;[/COLOR] [COLOR=#000000]} [/COLOR] |
[B]ssl.s1.conf[/B]
Скрытый текст |
---|
[COLOR=#000000]# Default SSL certificate enabled website[/COLOR] [COLOR=#000000]server {[/COLOR] [COLOR=#000000]listen 443 default_server http2;[/COLOR] [COLOR=#000000]server_name _;[/COLOR] [COLOR=#000000]# Enable SSL connection[/COLOR] [COLOR=#000000]include bx/conf/ssl.conf;[/COLOR] [COLOR=#000000]server_name_in_redirect off;[/COLOR] [COLOR=#000000]proxy_set_header X-Real-IP $remote_addr;[/COLOR] [COLOR=#000000]proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;[/COLOR] [COLOR=#000000]proxy_set_header Host $host:443;[/COLOR] [COLOR=#000000]proxy_set_header HTTPS YES;[/COLOR] [COLOR=#000000]set $proxyserver "[/COLOR][URL=http://127.0.0.1:8888/]http://127.0.0.1:8888"[/URL][COLOR=#000000];[/COLOR] [COLOR=#000000]set $docroot "/home/bitrix/www";[/COLOR] [COLOR=#000000]index index.php;[/COLOR] [COLOR=#000000]root /home/bitrix/www;[/COLOR] [COLOR=#000000]ssl_certificate /etc/nginx/ssl/cert.crt; [/COLOR] [COLOR=#000000]ssl_certificate_key /etc/nginx/ssl/private.key;[/COLOR] [COLOR=#000000]# Include parameters common to all websites[/COLOR] [COLOR=#000000]include bx/conf/bitrix.conf;[/COLOR] [COLOR=#000000]# Include server monitoring API's[/COLOR] [COLOR=#000000]include bx/server_monitor.conf;[/COLOR] [COLOR=#000000]} [/COLOR] |
[B]И конфиг httpd[/B]
[B]default.conf
[/B]
Скрытый текст |
---|
[COLOR=#000000]Listen 127.0.0.1:8888[/COLOR] [COLOR=#000000]<VirtualHost 127.0.0.1:8888>[/COLOR] [COLOR=#000000]ServerAdmin webmaster@localhost[/COLOR] [COLOR=#000000]DocumentRoot /home/bitrix/www[/COLOR] [COLOR=#000000]<Directory />[/COLOR] [COLOR=#000000]Options FollowSymLinks[/COLOR] [COLOR=#000000]AllowOverride None[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<DirectoryMatch .*\.svn/.*>[/COLOR] [COLOR=#000000]Require all denied[/COLOR] [COLOR=#000000]</DirectoryMatch>[/COLOR] [COLOR=#000000]<DirectoryMatch .*\.git/.*>[/COLOR] [COLOR=#000000]Require all denied[/COLOR] [COLOR=#000000]</DirectoryMatch>[/COLOR] [COLOR=#000000]<DirectoryMatch .*\.hg/.*>[/COLOR] [COLOR=#000000]Require all denied[/COLOR] [COLOR=#000000]</DirectoryMatch>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/>[/COLOR] [COLOR=#000000]Options Indexes FollowSymLinks MultiViews[/COLOR] [COLOR=#000000]AllowOverride All[/COLOR] [COLOR=#000000]DirectoryIndex index.php index.html index.htm[/COLOR] [COLOR=#000000]php_admin_value session.save_path /tmp/php_sessions/www[/COLOR] [COLOR=#000000]php_admin_value upload_tmp_dir /tmp/php_upload/www[/COLOR] [COLOR=#000000] Require all granted[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/bitrix/cache>[/COLOR] [COLOR=#000000]AllowOverride none[/COLOR] [COLOR=#000000] Require all denied[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/bitrix/managed_cache>[/COLOR] [COLOR=#000000]AllowOverride none[/COLOR] [COLOR=#000000] Require all denied[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/bitrix/local_cache>[/COLOR] [COLOR=#000000]AllowOverride none[/COLOR] [COLOR=#000000] Require all denied[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/bitrix/stack_cache>[/COLOR] [COLOR=#000000]AllowOverride none[/COLOR] [COLOR=#000000] Require all denied[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/upload>[/COLOR] [COLOR=#000000]AllowOverride none[/COLOR] [COLOR=#000000]AddType text/plain php,php3,php4,php5,php6,phtml,pl,asp,aspx,cgi,dll,exe,ico,shtm,shtml,fcg,fcgi,fpl,asmx,pht[/COLOR] [COLOR=#000000]php_value engine off[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/upload/support/not_image>[/COLOR] [COLOR=#000000]AllowOverride none[/COLOR] [COLOR=#000000] Require all denied[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/bitrix/images>[/COLOR] [COLOR=#000000]AllowOverride none[/COLOR] [COLOR=#000000]AddType text/plain php,php3,php4,php5,php6,phtml,pl,asp,aspx,cgi,dll,exe,ico,shtm,shtml,fcg,fcgi,fpl,asmx,pht[/COLOR] [COLOR=#000000]php_value engine off[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]<Directory /home/bitrix/www/bitrix/tmp>[/COLOR] [COLOR=#000000]AllowOverride none[/COLOR] [COLOR=#000000]AddType text/plain php,php3,php4,php5,php6,phtml,pl,asp,aspx,cgi,dll,exe,ico,shtm,shtml,fcg,fcgi,fpl,asmx,pht[/COLOR] [COLOR=#000000]php_value engine off[/COLOR] [COLOR=#000000]</Directory>[/COLOR] [COLOR=#000000]ErrorLog logs/error_log[/COLOR] [COLOR=#000000]# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.[/COLOR] [COLOR=#000000]LogLevel warn[/COLOR] [COLOR=#000000]CustomLog logs/access_log combined[/COLOR] [COLOR=#000000]<IfModule mod_rewrite.c>[/COLOR] [COLOR=#000000]#Nginx should have "proxy_set_header HTTPS YES;" in location[/COLOR] [COLOR=#000000]RewriteEngine On[/COLOR] [COLOR=#000000]RewriteCond %{HTTP:HTTPS} =YES[/COLOR] [COLOR=#000000]RewriteRule .* - [E=HTTPS:on,L] [/COLOR] [COLOR=#000000]</IfModule>[/COLOR] [COLOR=#000000]</VirtualHost> [/COLOR] |
Если я правильно понимаю то nginx проксирует запросы на httpd изменяя заголовки.
Где взять инфо как правильно должны формироваться заголовки?
Может есть у кого рабочий конфиг?