<?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>Schlunix.org &#187; Apache 2</title>
	<atom:link href="http://schlunix.org/archives/category/apache2/feed" rel="self" type="application/rss+xml" />
	<link>http://schlunix.org</link>
	<description>endeavors in *nix</description>
	<lastBuildDate>Thu, 30 Sep 2010 03:40:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Solaris 10 DNS Server for LAN</title>
		<link>http://schlunix.org/archives/8</link>
		<comments>http://schlunix.org/archives/8#comments</comments>
		<pubDate>Sun, 25 May 2008 10:03:00 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Apache 2]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dns server]]></category>
		<category><![CDATA[lan]]></category>
		<category><![CDATA[solaris 10]]></category>

		<guid isPermaLink="false">http://schlunix.org/?p=8</guid>
		<description><![CDATA[I finally got a DNS server up and running for my computers. Thanks to http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup.html with a great little script that turns your hosts file into DNS entries for BIND. Basically it came down to: Editing the /etc/hosts file to have all the records I wanted Create /var/named directory Place the h2n script in the [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got a DNS server up and running for my computers. Thanks to <a title="Logiqwest.com" href="http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup.html" target="_blank">http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup.html</a><br />
with a great little script that turns your hosts file into DNS entries for BIND.<br />
Basically it came down to:<br />
Editing the /etc/hosts file to have all the records I wanted<br />
Create /var/named directory<br />
Place the h2n script in the /var/named directory<br />
Execute the script with the following options:<br />
./h2n -d mydomain.home -n 192.168.1 -u email@mydomain.home<br />
Edit the resulting db.mydomain file to contain a CNAME to work nicely with my apache config<br />
*                       CNAME   sunfire<br />
Download the named.root file from <a href="ftp://ftp.rs.internic.net/" target="_blank">ftp://ftp.rs.internic.net/</a><br />
Copy it into the /var/named directory and change the name to db.cache<br />
cp named.conf /etc<br />
Make sure /etc/nsswitch.conf has the following line:<br />
hosts:      files    dns<br />
Create or Edit /etc/defaultdomain to contain the domain name, ie, &#8220;mydomain.home&#8221;<br />
Set the domain name<br />
# domainname `cat /etc/defaultdomain`<br />
Edit /etc/resolv.conf to contain:<br />
# these entries should be after the real world nameserver entries<br />
domain mydomain.home         # the domain just made<br />
nameserver 192.168.1.110   # the IP of the DNS server<br />
Check if the DNS server is running:<br />
svcs -a | grep dns<br />
If it isn&#8217;t, start it with:<br />
svcadm enable /network/dns/server<br />
Then start the named service:<br />
/usr/sbin/in.named &amp;<br />
&#8220;To use DNS, clients need to modify the /etc/resolv.conf, and /etc/nsswitch.conf as above. The /etc/defaultdomain file must also be created and establsihed as above.&#8221;<br />
I was able to use the DNS server I just made from a linux PC by just adding the IP of the new DNS server to my /etc/resolv.conf file</p>
]]></content:encoded>
			<wfw:commentRss>http://schlunix.org/archives/8/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More on redirects with apache</title>
		<link>http://schlunix.org/archives/4</link>
		<comments>http://schlunix.org/archives/4#comments</comments>
		<pubDate>Sun, 25 May 2008 09:56:22 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Apache 2]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[redirects]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[wildcard]]></category>

		<guid isPermaLink="false">http://schlunix.org/?p=4</guid>
		<description><![CDATA[Okay I got the redirects working finally (correctly), to redirect domain.com to www.domain.com. I tried a simple RedirectMatch but that was directing everything with &#8220;sunfire.mydomain.home&#8221; to &#8220;www.sunfire.mydomain.home&#8221;. So &#8220;blog.sunfire.mydomain.home&#8221; was redirecting to &#8220;www.sunfire.mydomain.home&#8221;. Just had to put this in my .htaccess: RewriteEngine On #Options +FollowSymlinks RewriteCond %{HTTP_HOST} ^sunfire\.mydomain\.home RewriteRule ^(.*)$ http://www.sunfire.mydomain.home [R=permanent,L] Notice I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Okay I got the redirects working finally (correctly), to redirect domain.com to www.domain.com. I tried a simple RedirectMatch but that was directing everything with &#8220;sunfire.mydomain.home&#8221; to &#8220;www.sunfire.mydomain.home&#8221;. So &#8220;blog.sunfire.mydomain.home&#8221; was redirecting to &#8220;www.sunfire.mydomain.home&#8221;.</p>
<p>Just had to put this in my .htaccess:</p>
<p>RewriteEngine On<br />
#Options +FollowSymlinks<br />
RewriteCond %{HTTP_HOST} ^sunfire\.mydomain\.home<br />
RewriteRule ^(.*)$ http://www.sunfire.mydomain.home [R=permanent,L]</p>
<p>Notice I don&#8217;t need the +FollowSymlinks in .htaccess because I put that in my httpd.conf</p>
]]></content:encoded>
			<wfw:commentRss>http://schlunix.org/archives/4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting redirects working in apache</title>
		<link>http://schlunix.org/archives/3</link>
		<comments>http://schlunix.org/archives/3#comments</comments>
		<pubDate>Sun, 25 May 2008 09:54:57 +0000</pubDate>
		<dc:creator>Lyle</dc:creator>
				<category><![CDATA[Apache 2]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[redirects]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[wildcard]]></category>

		<guid isPermaLink="false">http://schlunix.org/?p=3</guid>
		<description><![CDATA[Been down for a while, reconfiguring apache. I got the automatic domain thing working now so I can make all the subdomains I want and apache will automatically redirect to them. Of course I managed to screw it up somehow and had some sort of redirect loop going on. I just redid everything and it [...]]]></description>
			<content:encoded><![CDATA[<p>Been down for a while, reconfiguring apache. I got the automatic domain thing working now so I can make all the subdomains I want and apache will automatically redirect to them.</p>
<p>Of course I managed to screw it up somehow and had some sort of redirect loop going on. I just redid everything and it seems to be working now. I had been playing around with RedirectMatch and different configurations in httpd.conf and think I had some conflicting info somewhere, so resorted to a backup and stepped back through setting up the virtual servers. Used this site <a href="http://www.megalinux.net/archives/649.html" target="_blank">http://www.megalinux.net/archives/649.html</a> as my guide.</p>
<p>To make the virtual servers work really nicely and not have to set multiple ones up in apache do it like that site says:<br />
These are the steps from the site but subsituted with what I needed to use.<br />
Step 1: Configure wild-card DNS, so that *.sunfire.mydomain.home is a CNAME to sunfire.mydomain.home</p>
<p>Step 2: Configure apache. Create a new virtualhost section for *.sunfire.mydomain.home, like:</p>
<p>VirtualHost *<br />
ServerAlias *.sunfire.mydomain.home<br />
CustomLog /www/logs/subdomains.sunfire.mydomain.home-access_log combined<br />
ErrorLog /www/logs/subdomains.sunfire.mydomain.home-error_log<br />
VirtualDocumentRoot /www/%0<br />
VirtualScriptAlias  /www/%0/cgi-bin/<br />
/VirtualHost</p>
<p>Step 3: Restart apache to activate the new configuration</p>
<p>Step 4: Now, say you need blog.sunfire.mydomain.home, all that is required is to create these two directories<br />
/www/blog.sunfire.mydomain.home/<br />
/www/blog.sunfire.mydomain.home/cgi-bin/</p>
<p>Put the pertinent files in them and you can access them without having to restart apache</p>
<p>To do: Setup a redirect from domain.com to www.subdomain.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://schlunix.org/archives/3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

