solutions.withnetworks.com 서버 작업 패키지

nginx server block + certbot(SSL) + 클린 URL 매핑 — 회사 서버(218.144.90.15) 담당자용 실행 문서

서버: 218.144.90.15 DNS: 완료(A레코드) 기존 withwsv 설정 수정 금지

서버 작업 패키지 — solutions.withnetworks.com (nginx + certbot)

대상: 회사 PHP 서버 담당자 서버: 218.144.90.15 (현재 www.withwsv.n-e.kr 서비스 중인 nginx 서버, 사내망 218.144.90.x) 목적: solutions.withnetworks.com 서브도메인을 이 서버에서 SSR(PHP)로 정식 서비스 → 제품 6개 페이지를 검색엔진이 색인하게 함. 작업 성격: 기존 withwsv.n-e.kr 설정은 건드리지 말고, solutions 전용 server block을 추가만 한다.


0. 현재 상태 (작업 전 점검 결과)

점검 결과 의미
/a/pages/withVTM.php (직접) HTTP 200 PHP 콘텐츠는 정상 (그대로 재사용)
solutions.withnetworks.com 호스트명 (443) HTTP 404 solutions용 server block 없음 → 추가 필요
서버 SSL 인증서 CN=www.withwsv.n-e.kr solutions용 인증서 미발급 → certbot 필요
클린 URL /withvtm HTTP 404 URL 리라이트 미설정 → 추가 필요

→ 즉 certbot 발급 + nginx server block 추가 + 클린 URL 매핑 3가지가 신규 작업.


1. 사전 조건 (DNS — 사이트 관리자가 먼저 완료해야 함)

서버 작업(certbot) 전에 DNS가 이 서버를 가리켜야 한다. (certbot HTTP-01 인증이 DNS 기준으로 동작)

  • Wix DNS 레코드 관리에서:
  • solutions CNAME(cdn1.wixdns.net) 삭제
  • solutions A 레코드 → 218.144.90.15 추가
  • 전파 확인: bash dig +short solutions.withnetworks.com # → 218.144.90.15 나와야 함 이 값이 218.144.90.15로 나온 뒤 2번부터 진행.

2. STEP 0 — 환경 값 확인 (기존 withwsv 설정에서 그대로 복사)

solutions block은 기존 withwsv block과 동일한 root·php-fpm 소켓을 쓰면 된다. 실제 값 확인:

# 기존 withwsv server block 전체 출력 (root, fastcgi_pass 확인용)
sudo nginx -T | grep -n -A40 "withwsv"

# php-fpm 소켓 경로 확인
ls /run/php/                      # 예: php8.2-fpm.sock / php8.1-fpm.sock
# 또는
sudo systemctl status 'php*-fpm' --no-pager | head

확인할 값 2개: - root (문서 루트) — 예: /var/www/withwsv (실제값으로) - fastcgi_pass (php-fpm 소켓) — 예: unix:/run/php/php8.2-fpm.sock (실제 버전으로)

⚠️ 아래 설정의 root·fastcgi_pass·fastcgi-php.conf 경로위에서 확인한 실제 값으로 교체할 것.


3. STEP 1 — 임시 80 server block 생성 + certbot 발급

certbot --nginx 플러그인이 인증서를 붙이려면 먼저 solutions용 80 server block이 있어야 한다.

/etc/nginx/sites-available/solutions.withnetworks.com.conf 생성:

server {
    listen 80;
    server_name solutions.withnetworks.com;
    root /var/www/withwsv;          # ← STEP 0에서 확인한 실제 root
    location / { try_files $uri $uri/ =404; }
}

활성화 + 문법검사 + 리로드:

sudo ln -s /etc/nginx/sites-available/solutions.withnetworks.com.conf /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx

certbot 발급 (HTTP→HTTPS 강제 리다이렉트 포함):

sudo certbot --nginx -d solutions.withnetworks.com --redirect

/etc/letsencrypt/live/solutions.withnetworks.com/ 에 인증서 생성됨.


4. STEP 2 — 최종 nginx server block (클린 URL 매핑 포함)

.conf 파일을 아래 최종본으로 교체한다. (certbot이 추가한 ssl 줄이 있으면 이 블록으로 정리)

# ── solutions.withnetworks.com (HTTPS, SSR 제품 페이지) ──
server {
    listen 443 ssl;
    server_name solutions.withnetworks.com;

    root /var/www/withwsv;                 # ← 실제 root로 교체
    index index.php index.html;

    ssl_certificate     /etc/letsencrypt/live/solutions.withnetworks.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/solutions.withnetworks.com/privkey.pem;

    # 클린 URL → 실제 PHP 파일 매핑 (6개)
    location = /withvtm                { try_files /dev/null /a/pages/withVTM.php; }
    location = /withrex                { try_files /dev/null /a/pages/withREX.php; }
    location = /sase                   { try_files /dev/null /a/pages/sase.php; }
    location = /siem-soar             { try_files /dev/null /a/pages/seimsoar.php; }
    location = /fortinetsecurityfabric { try_files /dev/null /a/pages/securityfabric.php; }
    location = /radware               { try_files /dev/null /a/pages/radware.php; }

    # 정적 파일
    location = /robots.txt  { }
    location = /sitemap.xml { }

    # .php 실행 (소켓 경로 실제값으로 교체)
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;          # 배포판에 맞게 (CentOS면 fastcgi_params 등)
        fastcgi_pass unix:/run/php/php8.2-fpm.sock; # ← 실제 소켓으로 교체
    }

    # 그 외 자산(이미지/css/js)은 일반 서빙
    location / { try_files $uri $uri/ =404; }
}

# ── HTTP → HTTPS 강제 ──
server {
    listen 80;
    server_name solutions.withnetworks.com;
    return 301 https://$host$request_uri;
}

적용:

sudo nginx -t && sudo systemctl reload nginx

참고: try_files /dev/null /a/pages/withVTM.php; 가 환경에 따라 안 먹으면 rewrite ^/withvtm$ /a/pages/withVTM.php last; 방식으로 바꿔도 된다. 핵심은 클린 URL이 200으로 본문 HTML을 반환하는 것.


5. STEP 3 — robots.txt / sitemap.xml (문서 루트에 정적 파일로 생성)

{root}/robots.txt:

User-agent: *
Allow: /
Sitemap: https://solutions.withnetworks.com/sitemap.xml

{root}/sitemap.xml:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://solutions.withnetworks.com/withvtm</loc></url>
  <url><loc>https://solutions.withnetworks.com/withrex</loc></url>
  <url><loc>https://solutions.withnetworks.com/sase</loc></url>
  <url><loc>https://solutions.withnetworks.com/siem-soar</loc></url>
  <url><loc>https://solutions.withnetworks.com/fortinetsecurityfabric</loc></url>
  <url><loc>https://solutions.withnetworks.com/radware</loc></url>
</urlset>

⚠️ withwsv.n-e.kr에 이미 robots.txt/sitemap.xml이 있으면 서로 다른 server_name이라 충돌 안 함(같은 파일 공유 시 내용만 확인).


6. STEP 4 — 검증 (서버 작업 완료 기준)

# 1) 클린 URL이 200 + 본문 텍스트 반환
curl -sI https://solutions.withnetworks.com/withvtm        # → HTTP/2 200
curl -s  https://solutions.withnetworks.com/withvtm | grep -o "취약점" | head   # 본문 텍스트 확인

# 2) 6개 전부 200
for s in withvtm withrex sase siem-soar fortinetsecurityfabric radware; do
  echo -n "$s → "; curl -s -o /dev/null -w "%{http_code}\n" "https://solutions.withnetworks.com/$s"
done

# 3) HTTP→HTTPS 리다이렉트
curl -sI http://solutions.withnetworks.com/withvtm         # → 301 https://...

# 4) 인증서가 solutions용인지
echo | openssl s_client -connect solutions.withnetworks.com:443 \
  -servername solutions.withnetworks.com 2>/dev/null | openssl x509 -noout -subject
  # → subject=CN = solutions.withnetworks.com

# 5) robots/sitemap
curl -sI https://solutions.withnetworks.com/robots.txt     # 200
curl -sI https://solutions.withnetworks.com/sitemap.xml    # 200

6개 모두 200 + 인증서 CN이 solutions + HTTP 301 이면 서버 작업 완료.


7. 서버 담당자 작업 범위 밖 (다른 담당자에게 인계)

아래는 nginx/certbot 이후 단계 — 이 패키지에 포함 안 됨, 인계만:

  • PHP <head> SEO 블록(title/meta/canonical/JSON-LD) 6개 파일에 추가 → 04-서브도메인-이전-플레이북.md 4절
  • Wix 측: iframe 제거 + 기존 www.withnetworks.com/{slug} → solutions로 301(URL 리디렉션 관리자, 6개 개별 등록) + 메뉴 링크 교체 → 04 플레이북 7절
  • 구 도메인 정리: withwsv.n-e.kr/* → solutions 301 또는 noindex (중복 색인 차단) → 04 플레이북 8절
  • 검색엔진: GSC·네이버 서치어드바이저 sitemap 제출 → 04 플레이북 9절

주의사항 (반드시)

  1. 기존 withwsv.n-e.kr server block은 수정 금지. solutions는 별도 server block 추가만.
  2. root·fastcgi_pass·fastcgi-php.conf 경로STEP 0에서 확인한 실제 환경값으로 교체 (위 예시는 Ubuntu/PHP8.2 기준 — CentOS면 경로 다름).
  3. DNS(1절)가 218.144.90.15로 전파된 뒤 certbot 실행 (안 그러면 발급 실패).
  4. 작업은 서비스 영향 적은 시간대에, 각 단계 nginx -t 통과 확인 후 reload.
  5. 회사 서버 공인 IP(218.144.90.15)가 고정인지 확인 (유동이면 DNS가 깨질 수 있음 — 현재 withwsv가 쓰고 있어 고정일 가능성 높음).