pico.conf

pico.conf

나는 이것을 apache와 nginx 서버 모두에서 시도했습니다(동시에가 아니라 별도로). 두 기본 서버 모두 IP 주소에는 콘텐츠를 제대로 제공했지만 도메인 이름 "bt.dev"에는 콘텐츠를 제공하지 않았습니다. 이는 기본 "nginx/apache 서버가 실행 중입니다" 상태 페이지뿐만 아니라 여기서 디버깅하려는 PicoCMS 설치에도 적용됩니다.

다른 브라우저와 다른 장치를 사용해 봤기 때문에 클라이언트 캐싱 문제는 아닙니다.

이러한 서버를 처음 설정하는 것이므로 분명한 내용이 누락되었을 수 있습니다.

다음은 몇 가지 상태 출력입니다.

pico.conf

/etc/nginx/sites-available/pico.conf( sites-enabled/물론 심볼릭 링크됨):

server {
        listen 80;
        server_name 195.201.89.229 b-t.dev;
        root /var/www/html/pico;
        index index.php index.html index.htm;

        location / {
                try_files $uri $uri/ /index.php;
        }

        access_log /var/log/nginx/pico.access.log;
        error_log /var/log/nginx/pico.error.log;

        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_buffer_size 16k;
                fastcgi_buffers 4 16k;
        }

}

헤츠너 DNS 관리

Hetzner는 내 클라이언트가 다음과 같이 서버에 접속하고 있음을 확인했습니다.이 문제표시된 것이 문제가 될 수 있습니다.

# ping b-t.dev
PING b-t.dev (195.201.89.229) 56(84) bytes of data.
64 bytes from static.229.89.201.195.clients.your-server.de (195.201.89.229): icmp_seq=1 ttl=58 time=0.503 ms

방화벽 상태: $ sudo ufw status 상태: 활성

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
mosh                       ALLOW       Anywhere
22/tcp                     ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
Apache                     ALLOW       Anywhere
Nginx HTTP                 ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
mosh (v6)                  ALLOW       Anywhere (v6)
22/tcp (v6)                ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)
Apache (v6)                ALLOW       Anywhere (v6)
Nginx HTTP (v6)            ALLOW       Anywhere (v6)

systemctl 상태

$systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-12-03 22:16:00 CST; 17h ago
       Docs: man:nginx(8)
    Process: 5060 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 5069 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 5074 (nginx)
      Tasks: 2 (limit: 2286)
     Memory: 3.0M
     CGroup: /system.slice/nginx.service
             ├─5074 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             └─5075 nginx: worker process

IP 주소에서 도메인 이름으로의 리디렉션을 간단히 설정할 수 있을 것 같지만 임시방편 솔루션인 것 같습니다. 그렇지 않습니까?

관련 정보