우분투 apache2 sites-available 작성예문 > 우툰투 자료실

본문 바로가기

우툰투 자료실

우툰투 자료실 HOME


우분투 apache2 sites-available 작성예문

페이지 정보

작성자 낙엽타는향기 댓글 0건 조회 1,757회 작성일 23-07-25 23:36

본문

pcjoin_ssl.conf 예문

<IfModule mod_ssl.c>

<VirtualHost _default_:443>

ServerAdmin webmaster@localhost

        ServerName pcjoin.com

DocumentRoot /var/www/html/pcjoin/g5


SSLEngine on

SSLCertificateFile      /etc/letsencrypt/live/pcjoin.com/cert.pem

SSLCertificateKeyFile   /etc/letsencrypt/live/pcjoin.com/privkey.pem

SSLCertificateChainFile /etc/letsencrypt/live/pcjoin.com/chain.pem



RewriteEngine on

RewriteCond %{HTTPS} off

RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]  


</VirtualHost>

<VirtualHost _default_:443>

ServerAdmin webmaster@localhost

        ServerName www.pcjoin.com

DocumentRoot /var/www/html/pcjoin/g5


SSLEngine on

SSLCertificateFile      /etc/letsencrypt/live/www.pcjoin.com/cert.pem

SSLCertificateKeyFile   /etc/letsencrypt/live/www.pcjoin.com/privkey.pem

SSLCertificateChainFile /etc/letsencrypt/live/www.pcjoin.com/chain.pem



RewriteEngine on

RewriteCond %{HTTPS} off

RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]  


</VirtualHost>

</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet



 


pcjoin.conf 예문 
# Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
    ServerName pcjoin.com
    ServerAdmin webmaster@localhost
    DocumentRoot  /var/www/html/pcjoin/g5
    # Rewrite 엔진을 켭니다.
RewriteEngine on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]  
RewriteCond %{HTTPS} off
</VirtualHost>

<VirtualHost *:80>
    ServerAlias www.pcjoin.com
    ServerAdmin webmaster@localhost
    DocumentRoot  /var/www/html/pcjoin/g5
    # Rewrite 엔진을 켭니다.
RewriteEngine on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]  
RewriteCond %{HTTPS} off
</VirtualHost>





댓글목록



등록된 댓글이 없습니다.

댓글쓰기

내용
자동등록방지 숫자를 순서대로 입력하세요.
Total 78 / 1 page
검색 열기 닫기
게시물 검색

우툰투 자료실 목록