사용방법
http://를 https://로 변경하기 작성자 yun, 작성일 2021-01-08 19:22:29, 조회 1,638 |
---|
0. 정상적으로 운영되는 홈페이지 http://toonypaper.com을 만든다. 1. letsencrypt 서버에서 letsencrypt로 인증요청 letsencrypt certonly --webroot --webroot-path=/home/000000/www/toonypaperyun -d toonypaper.com -d www.toonypaper.com 2. 아파치에서 아래와 같이 수정 2-1. 00ssl.conf수정 <VirtualHost _default_:443> ServerAdmin webmaster@localhost ServerName toonypaper.com ServerAlias www.toonypaper.com DocumentRoot /home/000000/www/toonypaperyun ErrorLog ${APACHE_LOG_DIR}/toonypaperyunerror.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on SSLCertificateFile "/etc/letsencrypt/live/toonypaper.com/cert.pem" SSLCertificateKeyFile "/etc/letsencrypt/live/toonypaper.com/privkey.pem" SSLCertificateChainFile "/etc/letsencrypt/live/toonypaper.com/chain.pem" SSLCertificateChainFile "/etc/letsencrypt/live/toonypaper.com/fullchain.pem" <FilesMatch ".(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> <Directory /home/000000/www/toonypaperyun/> AllowOverride All Order allow,deny allow from all LimitRequestBody 2000000000 </Directory> </VirtualHost> 2-2 default.conf 중에서 기존 홈페이지 밑에 아래 리다이렉션 추가 <Location /> RedirectMatch /(.*)$ https://toonypaper.com/$1 </Location> 3. db 파일수정 UPDATE `toony_admin_siteconfig` SET ad_site_url='https://toonypaper.com',ad_msite_url='https://toonypaper.com/m'; 4.아파치 재시작 sudo service apache2 restart 5. 파일변경 5-1 /include/path.info.php define("__URL_PATH__","https://toonypaper.com/"); 5-2 /m/index.php 15 strstr("https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'],__URL_PATH__)===FALSE 5-3 /index.php 15 strstr("https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'],__URL_PATH__)==FALSE 5-4 /admin/index.php 8 5-5 /install/step2.php 27번 define("__URL_PATH__","".str_replace('install/'.basename(__FILE__),'','https://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'])."");n?>"); 5-6 include/head-script.php 98번 var ref_domain = "'."https://".$_SERVER['HTTP_HOST']."/".'"; 6. 투니 페이퍼 윤 홈페이지 재접속 https://toonypaper.com 댓글을 불러오는 중입니다.
|