chelkaz
@chelkaz

Как узнать куда идет обращение по Домену?

Захожу на сервер по домену и получаю
Forbidden
Access denied.

Днс прописаны верно на этот сервер.
Как узнать куда меня кидает в сервере? Логи error nginx и httpd пустые, в httpd access только "GET / HTTP/1.0" 403 118 "-" "Mozilla/5.0
В nginx сейчас вот:
префикс _ в server_name _; ведь означает с любых доменов?
# Default website
  server {

    listen 80 default_server;
    server_name _;
    server_name_in_redirect off;

    proxy_set_header	X-Real-IP        $remote_addr;
    proxy_set_header	X-Forwarded-For  $proxy_add_x_forwarded_for;
    proxy_set_header	Host $host:80;

    set $proxyserver	"http://127.0.0.1:8888";
    set $docroot		"/home/bitrix/www";

    index index.php;
    root /home/bitrix/www;

    # Redirect to ssl if need
    if (-f /home/bitrix/www/.htsecure) { rewrite ^(.*)$ https://$host$1 permanent; }

    # Include parameters common to all websites
    include bx/conf/bitrix.conf;

    # Include server monitoring locations
    include bx/server_monitor.conf;
  }

Вот полный:
/etc/nginx/nginx.conf
user bitrix;
worker_processes 8;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
worker_rlimit_nofile 10240;

events {
	use epoll;
	worker_connections  10240;
}

http {

	include /etc/nginx/mime.types;
	default_type application/force-download;
	server_names_hash_bucket_size 128;

	# Description of supported access log formats
	log_format main	'$remote_addr - $remote_user [$time_local - $upstream_response_time] '
                  '$status "$request" $body_bytes_sent '
                  '"$http_referer" "$http_user_agent" "$http_x_forwarded_for"';

	log_format common '$remote_addr - - [$time_local - $upstream_response_time] '
                    '"$request" $status $bytes_sent '
                    '"$http_referer" "$http_user_agent" $msec';

  log_format balancer '$remote_addr - $remote_user [$time_iso8601] "$host" '
                    '"$request" $status $body_bytes_sent "schema: $scheme" '
                    '"$http_referer" "$http_user_agent" "$http_x_forwarded_for" '
                    '"$request_length" : "$request_time" -> $upstream_response_time';

	log_format debug '$upstream_response_time,"$time_local","$remote_addr","$request",$status,$body_bytes_sent';


  # upload default maps
  include bx/maps/*.conf;

	# Disable request logging in nginx by default
	#access_log /var/log/nginx/access.log  common;
	access_log			off;

	sendfile			on;
	tcp_nopush			on;
	tcp_nodelay			on;

	client_max_body_size		1024m;
	client_body_buffer_size		4m;

	# Parameters for back-end request proxy
	proxy_connect_timeout		300;
	proxy_send_timeout		300;
	proxy_read_timeout		300;
	proxy_buffer_size		64k;
	proxy_buffers			8 256k;
	proxy_busy_buffers_size		256k;
	proxy_temp_file_write_size	10m;

	# Assign default error handlers
	error_page 500 502 503 504 /500.html;
	error_page 404 = /404.html;

	# Content compression parameters
	gzip				on;
	gzip_proxied			any;
	gzip_static			on;
	gzip_http_version		1.0;
	gzip_types			application/x-javascript application/javascript text/css;

	add_header "X-Content-Type-Options" "nosniff";
  add_header X-Frame-Options SAMEORIGIN;

	# Set nginx-push-stream-module common parameters
	include bx/conf/im_settings.conf;


	# Set default website
	include bx/site_enabled/*.conf;

	# Set additional websites
	include bx/site_ext_enabled/*.conf;
}

Это nginx сайт в bx/site_ext_enabled/
# Default website
	server {

		listen 80 default_server;
		server_name _;
		server_name_in_redirect off;

		proxy_set_header	X-Real-IP        $remote_addr;
		proxy_set_header	X-Forwarded-For  $proxy_add_x_forwarded_for;
		proxy_set_header	Host $host:80;

		set $proxyserver	"http://127.0.0.1:8888";
		set $docroot		"/home/bitrix/www";

		index index.php;
		root /home/bitrix/www;

		# Redirect to ssl if need
		if (-f /home/bitrix/www/.htsecure) { rewrite ^(.*)$ https://$host$1 permanent; }

		# Include parameters common to all websites
		include bx/conf/bitrix.conf;

		# Include server monitoring locations
		include bx/server_monitor.conf;
	}
  • Вопрос задан
  • 776 просмотров
Пригласить эксперта
Ответы на вопрос 2
Endru9
@Endru9
Админ Linux
Так у тебя ошибка прав доступа!
если располагаешь файлы именно в директории /home/bitrix/ , то, скорее всего, тебе нужно запускать и frontend и backend от имени пользователя bitrix. смотри nginx.conf одна из первых строк должна быть:
user bitrix bitrix;
+ всегда нужно смотреть логи! если не указывал иную директорию для логов, то стандратная: /var/log/nginx/
Ответ написан
Включи логирование в конфиге с проксированием,тогда и логи будут.access_log и error_log.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы