<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>도메인설정 &#8211; 험블비 블로그</title>
	<atom:link href="https://blog.layer1.dev/tag/%EB%8F%84%EB%A9%94%EC%9D%B8%EC%84%A4%EC%A0%95/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.layer1.dev</link>
	<description>layer 1</description>
	<lastBuildDate>Tue, 13 Jul 2021 02:17:26 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>우분투 16.04 서브도메인 설정하기 + apache2</title>
		<link>https://blog.layer1.dev/post/it/%ec%9a%b0%eb%b6%84%ed%88%ac-16-04-%ec%84%9c%eb%b8%8c%eb%8f%84%eb%a9%94%ec%9d%b8-%ec%84%a4%ec%a0%95%ed%95%98%ea%b8%b0-apache2/</link>
					<comments>https://blog.layer1.dev/post/it/%ec%9a%b0%eb%b6%84%ed%88%ac-16-04-%ec%84%9c%eb%b8%8c%eb%8f%84%eb%a9%94%ec%9d%b8-%ec%84%a4%ec%a0%95%ed%95%98%ea%b8%b0-apache2/#respond</comments>
		
		<dc:creator><![CDATA[layer1]]></dc:creator>
		<pubDate>Fri, 10 Apr 2020 15:34:22 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[도메인설정]]></category>
		<category><![CDATA[서브도메인]]></category>
		<category><![CDATA[우분투16.04]]></category>
		<guid isPermaLink="false">https://autorevenue.ai/blog/?p=272</guid>

					<description><![CDATA[안녕하세요. 험블비 입니다.
우분투 16.04 + apache2 서브도메인 설정 방법을 알려드리겠습니다.
아파치 서브도메인을 관리하는 설정 파일은 apt 패키지 매니저로 설치했다면]]></description>
										<content:encoded><![CDATA[
<p>안녕하세요. 험블비 입니다.</p>



<p>우분투 16.04 + apache2 서브도메인 설정 방법을 알려드리겠습니다.</p>



<h2 class="wp-block-heading">서브도메인 설정하기</h2>



<p>아파치 서브도메인을 관리하는 설정 파일은 apt 패키지 매니저로 설치했다면</p>



<pre class="wp-block-code"><code>/etc/apache2/sites-available
/etc/apache2/sites-enable</code></pre>



<p>이 두 디렉토리 입니다. 이 중 sites-available 에 서브도메인을 위한 설정파일을 만들어 주면 됩니다.</p>



<p>여기서 설정파일의 이름은 {서브도메인을포함한도메인}.conf 입니다. 제 블로그를 예시로 들자면 autorevenue.ai 에 blog라는 서브도메인을 사용한다고 하면 blog.autorevenue.ai가 되겠죠?</p>



<p>여기 뒤에 .conf를 붙인 blog.autorevenue.ai.conf 로 만들어 주면 됩니다.</p>



<p>아래 명령어로 설정파일을 생성해줍시다. (파일명은 적용하고자 하는 도메인에 맞춰 다시 작성해주세요)</p>



<pre class="wp-block-code"><code># 예시
vi /etc/apache2/sites-available/blog.autorevenue.ai.conf </code></pre>


<div style="border: 1px solid gray;">
<p>&lt;VirtualHost *:80&gt;<br>ServerName <span style="color: #ff0000;">blog.autorevenue.ai</span><br>ServerAlias <span style="color: #ff0000;">blog.autorevenue.ai</span><br>ServerAdmin webmaster@localhost<br># DocumentRoot /var/www/html/{매칭할 디렉토리 이름}<br>DocumentRoot <span style="color: #ff0000;">/var/www/html/blog</span></p>
<p># Available loglevels: trace8, &#8230;, trace1, debug, info, notice, warn,<br># error, crit, alert, emerg.<br># It is also possible to configure the loglevel for particular<br># modules, e.g.<br>#LogLevel info ssl:warn</p>
<p>ErrorLog ${APACHE_LOG_DIR}/error.log<br>CustomLog ${APACHE_LOG_DIR}/access.log combined</p>
<p># For most configuration files from conf-available/, which are<br># enabled or disabled at a global level, it is possible to<br># include a line for only one particular virtual host. For example the<br># following line enables the CGI configuration for this host only<br># after it has been globally disabled with &#8220;a2disconf&#8221;.<br>#Include conf-available/serve-cgi-bin.conf<br>&lt;/VirtualHost&gt;</p>
</div>


<p>그 다음 위 내용을 복사해서 넣어주세요. 물론 빨간색 부분은 본인 설정에 맞게 넣어주시면 됩니다. 저는 blog.autorevenue.ai 라는 도메인으로 적용할 예정이고 blog.autorevenue.ai 도메인으로 들어오는 경우 /var/www/html/blog로 가도록 설정했습니다.</p>



<p>완료되었으면 :wq + 엔터로 저장하고 빠져나옵니다.</p>



<p>이후 아래 명령어로 파일이 제대로 생성 되었는지 확인합니다.</p>



<pre class="wp-block-code"><code>ls /etc/apache2/sites-available</code></pre>



<p>생성이 잘 되었다면 이제 해당 파일을 /etc/apache2/sites-enable 에 링크를 걸어주어야 합니다. 명령어를 알려드릴게요.</p>



<pre class="wp-block-code"><code>cd /etc/apache2/sites-enable
ln -s ../sites-available/{설정파일명} ./{설정파일명}</code></pre>



<p>위에서 {설정파일명} 부분에는 아까 만든 .conf 파일 이름을 써주세요. 제 경우 예시는 아래와 같겠네요.</p>



<pre class="wp-block-code"><code>ln -s ../sites-available/blog.autorevenue.ai.conf ./blog.autorevenue.ai.conf</code></pre>



<p>잘 따라 오셨나요? 이제 마지막으로 아파치를 리로드 하면 됩니다.</p>



<p>재시작을 해도 괜찮지만 웹서버가 잠시간 멈출 수 있으니 설정만 따로 로드하는거에요.</p>



<pre class="wp-block-code"><code>service apache2 reload</code></pre>



<p>자. 여기까지 하면 완료입니다. 이제 설정하신 서브도메인으로 접속하시면 설정하신 디렉토리로 잘 연결 될거에요. 고생하셨습니다.</p>



<p>아, 참고로 서브도메인이 아닌 도메인이 여러개 있는 경우에도 사용 가능합니다. 똑같이 해주시면 되요. 긴 글 읽어주셔서 감사합니다 <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>


https://blog.layer1.dev/%ec%a0%95%eb%b3%b4/%eb%8d%b0%ec%9d%b4%ed%84%b0-%eb%9d%bc%eb%b2%a8%eb%a7%81-%ec%9d%b8%ed%84%b0%eb%84%b7-%ec%95%8c%eb%b0%94%eb%8a%94-%eb%8b%a4%eb%8b%a8%ea%b3%84%ec%9d%bc%ea%b9%8c-feat-%ec%8a%a4%ed%83%80%eb%a7%88/


<script src="https://ads-partners.coupang.com/g.js"></script>
<script>
	new PartnersCoupang.G({ id:210404, subId: "revenueblog", width:'100%', height:150 });
</script>


https://blog.layer1.dev/post/it/oracle-vm-standard-a1-flex-cpu-%ec%84%b1%eb%8a%a5-%ed%85%8c%ec%8a%a4%ed%8a%b8-aws-%ec%9d%b8%ec%8a%a4%ed%84%b4%ec%8a%a4%ec%99%80%ec%9d%98-%eb%b9%84%ea%b5%90-%ed%8f%ac%ed%95%a8/

https://blog.layer1.dev/post/%eb%8f%99%ea%b8%80%ec%97%86%eb%8a%94-%eb%b8%94%eb%a3%a8%ed%88%ac%ec%8a%a4-%eb%a7%88%ec%9a%b0%ec%8a%a4-%ec%b6%94%ec%b2%9c-feat-%eb%a7%a5%eb%b6%81-%eb%a7%88%ec%9d%b4%ed%81%ac%eb%a1%9c%ec%86%8c/


<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.layer1.dev/post/it/%ec%9a%b0%eb%b6%84%ed%88%ac-16-04-%ec%84%9c%eb%b8%8c%eb%8f%84%eb%a9%94%ec%9d%b8-%ec%84%a4%ec%a0%95%ed%95%98%ea%b8%b0-apache2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
