<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Apache Vhost Creation Script (Gentoo)</title>
	<atom:link href="http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/</link>
	<description>The blog of Brian Ortiz aka Ortzinator, developer, artist, and the nicest guy you know.</description>
	<lastBuildDate>Wed, 14 Jul 2010 13:08:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: vibram</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-19089</link>
		<dc:creator>vibram</dc:creator>
		<pubDate>Wed, 14 Jul 2010 13:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-19089</guid>
		<description>Mark S. is definitely on the right track. If you want to get a professional looking email address, Id recommend buying your name domain name, like or  &lt;br&gt;&lt;a href=&quot;http://www.discountbootsonsale.co.uk&quot; rel=&quot;nofollow&quot;&gt;discount ugg boots&lt;/a&gt;&lt;br&gt; If its common it might be difficult to get, however, be creative and you can usually find something.</description>
		<content:encoded><![CDATA[<p>Mark S. is definitely on the right track. If you want to get a professional looking email address, Id recommend buying your name domain name, like or  <br /><a href="http://www.discountbootsonsale.co.uk" rel="nofollow">discount ugg boots</a><br /> If its common it might be difficult to get, however, be creative and you can usually find something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ortzinator</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-15084</link>
		<dc:creator>Ortzinator</dc:creator>
		<pubDate>Wed, 29 Jul 2009 20:27:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-15084</guid>
		<description>Cool, thanks!

htdocs is the group I use for restricting permissions to web stuff, but I didn&#039;t know you could do that.</description>
		<content:encoded><![CDATA[<p>Cool, thanks!</p>
<p>htdocs is the group I use for restricting permissions to web stuff, but I didn&#8217;t know you could do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blokkie</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-15080</link>
		<dc:creator>Blokkie</dc:creator>
		<pubDate>Wed, 29 Jul 2009 13:06:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-15080</guid>
		<description>PS:  I forgot ,

chown apache: $dir

the  &quot;:&quot; automagicly picks the default group of the user. 


An actual restart of apache is not needed  coz you only added something to the config . So  apache2ctl graceful  is sufficient I think . 
This also prevents users of other sites on thesame server to not get disconnected . 

maybe before the restart / gracefull  another check can be added  like :

 /usr/sbin/apache2 -S &#124; grep OK 


Just my 5 cents 

Cheerio&#039;s</description>
		<content:encoded><![CDATA[<p>PS:  I forgot ,</p>
<p>chown apache: $dir</p>
<p>the  &quot;:&quot; automagicly picks the default group of the user. </p>
<p>An actual restart of apache is not needed  coz you only added something to the config . So  apache2ctl graceful  is sufficient I think .<br />
This also prevents users of other sites on thesame server to not get disconnected . </p>
<p>maybe before the restart / gracefull  another check can be added  like :</p>
<p> /usr/sbin/apache2 -S | grep OK </p>
<p>Just my 5 cents </p>
<p>Cheerio&#8217;s</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blokkie</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-15079</link>
		<dc:creator>Blokkie</dc:creator>
		<pubDate>Wed, 29 Jul 2009 13:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-15079</guid>
		<description>I&#039;ve moved some stuff arround coz I did not like adding everything to the default_vhost.conf

I also added  a custom log file and added some allow permission stuff 

here it go&#039;s :


#!/bin/bash
#Copyright (c) 2008 Brian Ortiz &quot;Ortzinator&quot;
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the &quot;Software&quot;), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in
#all copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#THE SOFTWARE.

if [ $# -ne 1 ]
then
echo Exactly one argument required
exit 1
fi

dir=/var/www/$1

if [ -d $dir ]
then
echo ERROR: directory $dir already exists!
exit 1
else
echo Creating directory $dir
mkdir $dir &#124;&#124; { echo Could not create directory $dir; exit 1; }

echo Creating directory $dir/htdocs
mkdir $dir/htdocs  &#124;&#124; { echo Could not create directory $dir/htdocs; exit 1; }

echo Setting permissions
chown apache: $dir  &#124;&#124; { echo Error setting permissions for $dir; exit 1; }
chown apache: $dir/htdocs  &#124;&#124; { echo Error setting permissions for $dir/htdocs; exit 1; }

echo &quot;

Placeholder lol

&quot; &gt; $dir/htdocs/index.html
chown blokkie: $dir/htdocs/index.html  &#124;&#124; { echo Error setting permissions for $dir/htdocs/index.html; exit 1; }

chmod -R 775 $dir

echo &quot;

 
ServerName $1
DocumentRoot /var/www/$1/htdocs

Allow from all
AllowOverride all
Order allow,deny

CustomLog /var/log/apache2/sites-$1.log common 
 

&quot; &gt; /etc/apache2/vhosts.d/$1.conf &#124;&#124; { echo Could not add vhost to apache config!; exit 1; }

echo Restarting apache
/etc/init.d/apache2 restart &#124;&#124; { echo Could not restart apache!; exit 1; }

echo All done!
exit 0
fi</description>
		<content:encoded><![CDATA[<p>I&#8217;ve moved some stuff arround coz I did not like adding everything to the default_vhost.conf</p>
<p>I also added  a custom log file and added some allow permission stuff </p>
<p>here it go&#8217;s :</p>
<p>#!/bin/bash<br />
#Copyright (c) 2008 Brian Ortiz &quot;Ortzinator&quot;<br />
#<br />
#Permission is hereby granted, free of charge, to any person obtaining a copy<br />
#of this software and associated documentation files (the &quot;Software&quot;), to deal<br />
#in the Software without restriction, including without limitation the rights<br />
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br />
#copies of the Software, and to permit persons to whom the Software is<br />
#furnished to do so, subject to the following conditions:<br />
#<br />
#The above copyright notice and this permission notice shall be included in<br />
#all copies or substantial portions of the Software.<br />
#<br />
#THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br />
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br />
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br />
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br />
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br />
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN<br />
#THE SOFTWARE.</p>
<p>if [ $# -ne 1 ]<br />
then<br />
echo Exactly one argument required<br />
exit 1<br />
fi</p>
<p>dir=/var/www/$1</p>
<p>if [ -d $dir ]<br />
then<br />
echo ERROR: directory $dir already exists!<br />
exit 1<br />
else<br />
echo Creating directory $dir<br />
mkdir $dir || { echo Could not create directory $dir; exit 1; }</p>
<p>echo Creating directory $dir/htdocs<br />
mkdir $dir/htdocs  || { echo Could not create directory $dir/htdocs; exit 1; }</p>
<p>echo Setting permissions<br />
chown apache: $dir  || { echo Error setting permissions for $dir; exit 1; }<br />
chown apache: $dir/htdocs  || { echo Error setting permissions for $dir/htdocs; exit 1; }</p>
<p>echo &quot;</p>
<p>Placeholder lol</p>
<p>&quot; &gt; $dir/htdocs/index.html<br />
chown blokkie: $dir/htdocs/index.html  || { echo Error setting permissions for $dir/htdocs/index.html; exit 1; }</p>
<p>chmod -R 775 $dir</p>
<p>echo &quot;</p>
<p>ServerName $1<br />
DocumentRoot /var/www/$1/htdocs</p>
<p>Allow from all<br />
AllowOverride all<br />
Order allow,deny</p>
<p>CustomLog /var/log/apache2/sites-$1.log common </p>
<p>&quot; &gt; /etc/apache2/vhosts.d/$1.conf || { echo Could not add vhost to apache config!; exit 1; }</p>
<p>echo Restarting apache<br />
/etc/init.d/apache2 restart || { echo Could not restart apache!; exit 1; }</p>
<p>echo All done!<br />
exit 0<br />
fi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ortzinator</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-12926</link>
		<dc:creator>Ortzinator</dc:creator>
		<pubDate>Mon, 12 Jan 2009 17:58:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-12926</guid>
		<description>More like Wordpress fail.</description>
		<content:encoded><![CDATA[<p>More like Wordpress fail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wang</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-12925</link>
		<dc:creator>Wang</dc:creator>
		<pubDate>Mon, 12 Jan 2009 17:56:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-12925</guid>
		<description>copy and paste FAIL!</description>
		<content:encoded><![CDATA[<p>copy and paste FAIL!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ortzinator</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-12673</link>
		<dc:creator>Ortzinator</dc:creator>
		<pubDate>Tue, 02 Dec 2008 21:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-12673</guid>
		<description>Oh, I didn&#039;t notice Wordpress encoded them. Thanks Driusha! I&#039;ll try to fix that.</description>
		<content:encoded><![CDATA[<p>Oh, I didn&#8217;t notice Wordpress encoded them. Thanks Driusha! I&#8217;ll try to fix that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Driusha</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-12671</link>
		<dc:creator>Driusha</dc:creator>
		<pubDate>Tue, 02 Dec 2008 19:48:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-12671</guid>
		<description>I mean synbols &quot;gross then&quot; and &quot;less then&quot; :)</description>
		<content:encoded><![CDATA[<p>I mean synbols &#8220;gross then&#8221; and &#8220;less then&#8221; <img src='http://blog.ortz.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Driusha</title>
		<link>http://blog.ortz.org/2008/11/13/apache-vhost-creation-script-gentoo/comment-page-1/#comment-12670</link>
		<dc:creator>Driusha</dc:creator>
		<pubDate>Tue, 02 Dec 2008 19:46:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ortz.org/?p=143#comment-12670</guid>
		<description>&quot;&lt;&quot; and &quot;&gt;&quot; should replace whith &quot;&quot;.</description>
		<content:encoded><![CDATA[<p>&#8220;&lt;&#8221; and &#8220;&gt;&#8221; should replace whith &#8220;&#8221;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
