<?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>Kurinchi Blogger Scribbles ... &#187; netstat</title>
	<atom:link href="http://kurinchilamp.kurinchilion.com/tag/netstat/feed" rel="self" type="application/rss+xml" />
	<link>http://kurinchilamp.kurinchilion.com</link>
	<description>On Open Source Technologies</description>
	<lastBuildDate>Mon, 02 Jan 2012 06:14:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Ubuntu: Configuring Virtual Hosts to listen on different ports</title>
		<link>http://kurinchilamp.kurinchilion.com/2010/03/ubuntu-configuring-virtual-hosts-to-listen-on-different-ports.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2010/03/ubuntu-configuring-virtual-hosts-to-listen-on-different-ports.html#comments</comments>
		<pubDate>Fri, 05 Mar 2010 20:50:53 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[enable disable site]]></category>
		<category><![CDATA[netstat]]></category>
		<category><![CDATA[port configuration]]></category>
		<category><![CDATA[symbolic link]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Virtual Host Configuration]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=760</guid>
		<description><![CDATA[Files to check - /etc/apache2/ports.conf - /etc/apache2/apache2.conf Consider the ServerName to be &#8220;myserver&#8221;. Check /etc/hosts for an entry 127.0.0.1 localhost 192.168.1.100 myserver.com myserver &#8230; We will see an example where by we can change/add apache ports in order to have two sites hosted on different ports. Example: http://myserver:8001 http://myserver:8002 First, we need to edit ports.conf [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Files to check</strong><br />
- /etc/apache2/ports.conf<br />
- /etc/apache2/apache2.conf</p>
<p>Consider the ServerName to be &#8220;myserver&#8221;. Check /etc/hosts for an entry </p>
<p>127.0.0.1       localhost<br />
192.168.1.100   myserver.com    myserver<br />
&#8230;<br />
<span id="more-760"></span><br />
We will see an example where by we can change/add apache ports in order to have two sites hosted on different ports. </p>
<p>Example:<br />
<em>http://myserver:8001</p>
<p>http://myserver:8002</em></p>
<p>First, we need to edit ports.conf file to add two port numbers 8001, 8002</p>
<p><strong>$ vi /etc/apache2/ports.conf</strong></p>
<p>File Content</p>
<p>Listen 80<br />
Listen 8001<br />
Listen 8002</p>
<p><IfModule mod_ssl.c><br />
    Listen 443<br />
</IfModule></p>
<p>Now, ports.conf file is configured to listen on 80, 8001, 8002</p>
<p>Restart apache for the changes to take effect<br />
<strong>$ /etc/init.d/apache2 restart</strong></p>
<p>To check if Apache is listening on the correct port, netstat command comes in handy</p>
<p><strong>$ netstat -tulpn<br />
$ netstat -tulpn | grep :8002</strong></p>
<p>Setup two site location in /var/www<br />
<strong>$ mkdir /var/www/site1<br />
$ cd /var/www/site1<br />
$ echo &#8220;In site1&#8243; > index.html</strong></p>
<p><strong>$ mkdir /var/www/site2<br />
$ cd /var/www/site2<br />
$ echo &#8220;In site2&#8243; > index.html</strong></p>
<p>Now, lets create myserver.conf file in /etc/apache2/sites-available with the content shown below</p>
<p><VirtualHost 192.168.1.100:8001><br />
        ServerName greenland<br />
        DocumentRoot /var/www/site1<br />
</VirtualHost></p>
<p><VirtualHost 192.168.1.100:8002><br />
        ServerName greenland<br />
        DocumentRoot /var/www/site2<br />
</VirtualHost></p>
<p>Create a symbolic link to enable the site in sites-enabled folder<br />
<strong>$ cd /etc/apache2/sites-enabled<br />
$ ln -s ../sites-available/myserver.conf myserver.conf</strong></p>
<p>In Debian, a2ensite and a2dissite comes in handy to enable, disable sites</p>
<p>Again, restart apache for the changes to take effect<br />
<strong>$ /etc/init.d/apache2 restart</strong></p>
<p>In the browser, type </p>
<p>http://myserver:8001</p>
<p>http://myserver:8002</p>
<p>to see the two sites in action.</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2010/03/ubuntu-configuring-virtual-hosts-to-listen-on-different-ports.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: Can&#8217;t connect to local MySQL server through socket &#8216;/var/run/mysqld/mysqld.sock&#8217;</title>
		<link>http://kurinchilamp.kurinchilion.com/2010/02/mysql-cant-connect-to-local-mysql-server-through-socket-varrunmysqldmysqld-sock.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2010/02/mysql-cant-connect-to-local-mysql-server-through-socket-varrunmysqldmysqld-sock.html#comments</comments>
		<pubDate>Fri, 05 Feb 2010 08:27:25 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[my.cnf]]></category>
		<category><![CDATA[mysql socket error]]></category>
		<category><![CDATA[netstat]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=751</guid>
		<description><![CDATA[Reason why this error might occur: i) Incomplete MySQL implementation ii) MySQL setting mis-configuration Solution: root@myserver:/# vi /etc/mysql/my.cnf Comment out the below line in my.cnf file to make MySQL listen on ALL interfaces #bind-address = 127.0.0.1 root@myserver:/# netstat -tap &#124; grep mysql tcp 0 0 *:mysql *:* LISTEN 17785/mysqld Note that above line which indicates [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Reason why this error might occur:</strong></p>
<p>i) Incomplete MySQL implementation<br />
ii) MySQL setting mis-configuration</p>
<p><strong>Solution:</strong></p>
<p><strong>root@myserver:/# vi /etc/mysql/my.cnf</strong></p>
<p>Comment out the below line in my.cnf file to make MySQL listen on ALL interfaces<br />
#bind-address = 127.0.0.1</p>
<p><strong>root@myserver:/# netstat -tap | grep mysql</strong><br />
tcp        0      0 *:mysql                 *:*                     LISTEN      17785/mysqld</p>
<p>Note that above line which indicates MySQL listening on all interfaces.</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2010/02/mysql-cant-connect-to-local-mysql-server-through-socket-varrunmysqldmysqld-sock.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

