your baddie teddie since 1983.

Category: tech (Page 3 of 4)

Microsoft Excel Macro – Search and replace

While covering for my colleague at a PremierCare site, the marketing manager wanted to see if i could help him with some basic search and replace macros to eliminate the need for his manual data cleanup when he export reports from the database.

He wanted to change items codes into names (e.g 123 -> Hotel) and country common names to ISO 3166 2-letter (alpha-2) codes (e.g Japan -> JP).

For changing of common country names to alpha-2 codes:

Sub multiFindNReplaceCountries()
 Dim myList, myRange
 Set myList = Sheets("Country Codes").Range("A2:B273") 'two column range where find/replace pairs are
 Set myRange = Sheets("Report").Columns(1) 'range to be searched
 For Each cel In myList.Columns(1).Cells
 myRange.Replace what:=cel.Value, replacement:=cel.Offset(0, 1).Value
 Next cel
 End Sub

This select a list of country names from the worksheet labelled” Country Codes”, from Range A2 to B273. First column (A) is where i have the full country name, and 2nd column (B) is where i have the 2-alpha country code. There are a total of 273 entries, hence i select the range to B273.

The worksheet that i want to do the search and replace is called “Report”. The country names are all on the first column of the worksheet, hence in myRange, i have it set to Columns(1), indicating that the first column are the cells that the script needs to perform the search and replace.

For changing of ID codes to their respective descriptions:

Sub multiFindNReplaceCode()
 Dim myList, myRange
 Set myList = Sheets("Codes").Range("A2:B53") 'two column range where find/replace pairs are
 Set myRange = Sheets("Report").Rows(1) 'range to be searched
 For Each cel In myList.Columns(1).Cells
 myRange.Replace what:=cel.Value, replacement:=cel.Offset(0, 1).Value
 Next cel
 End Sub

This select a list of codes from the worksheet labelled “Codes”, from Range A2 to B53. First column (A) is where i have the codes, and 2nd column (B) is where i have the full descriptive names. There are a total of 53 entries, hence i select the range to B53.

The worksheet that i want to do the search and replace is called “Report”. The codes span horizontally across Row 1, hence in myRange, i have it set to Rows(1), indicating that the first row are the cells that the script needs to perform the search and replace.

Just insert a module using the VBA Macro editor in your excel (or press Alt + 11), past the above and change the worksheet names, run the script and you should see the values automatically updated.

iPad 3 pricing compared – Australia, Singapore, Malaysia, US. [Updated with Thailand]

The new iPad launched in Malaysia on 20th April 2012. According to my analysis on historical pricing, Malaysia’s iPad pricing is usually the cheapest, even cheaper than US itself. With the launch of the new iPad, i investigate the comparative pricing from four five countries – Australia, Singapore, Malaysia, Thailand and US.

We are using the lowest (16GB) and the highest (64GB) capacity for the Wifi-only and the Wifi + 4G models. All pricing used are from the black models since there is no price difference for color choice on the Apple online store, and USD conversion are done using prevailing exchange rate (as of April 23rd 2012) from XE.com.

CountryDescriptionPrice (native)Price (USD)
MalaysiaiPad 3 Wi-Fi only 16GB (MC705ZP/A)RM 1,499.00$489.86
SingaporeiPad 3 Wi-Fi only 16GB (MC705ZP/A)S$658.00$526.40
AustraliaiPad 3 Wi-Fi only 16GB (MC705X/A)A$528.00$512.16
USAiPad 3 Wi-Fi only 16GB (MC705LL/A)US$499.00$499.00
ThailandiPad 3 Wi-Fi only 16GB (MC705TH/A)฿16,500$523.05
MalaysiaiPad 3 Wi-Fi only 64GB (MC707ZP/A)RM 2,099.00$685.95
SingaporeiPad 3 Wi-Fi only 64GB (MC707ZP/A)S$918.00$734.40
AustraliaiPad 3 Wi-Fi only 64GB (MC707X/A)A$759.00$736.23
USAiPad 3 Wi-Fi only 64GB (MC707LL/A)US$699.00$699.00
ThailandiPad 3 Wi-Fi only 64GB (MC707TH/A)฿22,500$713.26
MalaysiaiPad 3 Wifi + 4G 16GB (MD366ZP/A)RM 1899.00$620.59
SingaporeiPad 3 Wifi + 4G 16GB (MD366ZP/A)S$828.00$662.40
AustraliaiPad 3 Wifi + 4G 16GB (MD366X/A)A$679.00$658.63
USAiPad 3 Wifi + 4G 16GB (MD366LL/A)US$629.00$629.00
ThailandiPad 3 Wifi + 4G 16GB (MD366TH/A)฿20,500$649.86
MalaysiaiPad 3 Wifi + 4G 64GB (MD368ZP/A)RM 2,499.00$816.67
SingaporeiPad 3 Wifi + 4G 64GB (MD368ZP/A)S$1088.00$870.40
AustraliaiPad 3 Wifi + 4G 64GB (MD368X/A)A$899.00$872.03
USAiPad 3 Wifi + 4G 64GB (MD368LL/A)US$829.00$829.00
ThailandiPad 3 Wifi + 4G 64GB (MD368TH/A)฿26,500$840.07



From the table above, we can establish that if you are looking for a good deal on iPad 3, Malaysia is the currently one of the cheapest (if not the cheapest) place to get your hands on a new iPad 3. The US is a close 2nd, averaging a US$10 gap. Australia just edges out Singapore to claim the 3rd spot, but not by much, with the highest end 64GB Wifi + 4G model being the only model that is more expensive than Singapore.

How to edit host file on Mac OSX Leopard/Snow Leopard/Lion

Introduction

The hosts file is a text file that maps hostnames to IP addresses.
Upon typing a url address on the browser, the system will first check if there is a relevant entry on the hosts file and gets the corresponding IP address, else it resolves the IP via the active connection’s DNS servers.

The hosts file can be edited to block certain hostnames (like ad-serving/malicious hosts), or used for web development purposes, i.e. to redirect domains to local addresses.

Editing the hosts file

Editing the hosts file in Mac OS X, is a pretty easy task, especially if you are familiar with the terminal. (Tested on Leopard/Snow Leopard/Lion)

Step 1 – Open the Terminal.app

Either by typing “Terminal” on the Spotlight, or by going into Applications -> Utilities -> Terminal.

Step 2 – Open the hosts file

Open the hosts file by typing on the Terminal that you have just opened:

$ sudo nano /private/etc/hosts

Type your user password when prompted.

Step 3 – Edit the hosts file

The hosts file contains some comments (lines starting with the # symbol), as well as some default hostname mappings (e.g. 127.0.0.1 – localhost).
Simply append your new mappings underneath the default ones. Or edit one of the default values if you know what you are doing!
You can navigate the file using the arrow keys.

Step 4 – Save the hosts file

When done editing the hosts file, press control-o to save the file.
Press enter on the filename prompt, and control-x to exit the editor.

Step 5 – Flush the DNS cache

You can issue a simple Terminal command to flush the DNS cache, and have your host file changes to take immediate effect:

$ dscacheutil -flushcache

And you’re done!

Apple iPad 3 (iPad 3rd generation) model numbers

With Apple deciding to forgo the numeric naming in their latest iPad, many people are finding it hard to make reference to “The New iPad”. It is not helped by the lack any distinct labeling on the box itself to differentiate it from the iPad 2. The only way to tell is by cross referencing the model number, or making sure that there is an “iCloud” sticker on the bottom of the box. For convenience and to avoid confusion, the new iPad (3rd generation) would be referred as “iPad 3″ throughout this post.

I came across this very problem when i bought a few sets of the iPad 3 to resell. Buyers would ask how can they tell that this is the iPad 3, instead of an iPad 2? Finding a suitable reference table for the model number that translate to which iPad 3 is also hard to come by. Hence i decided to compile a list, based on the Singapore retail sets of iPad 3.

The model number is displayed on the back of the box, bottom right corner.
iPad 3 model number label
iPad 3 – Black
MC705ZP/A – iPad 3 Wi-Fi only 16GB – Black
MC706ZP/A – iPad 3 Wi-Fi only 32GB – Black
MC707ZP/A – iPad 3 Wi-Fi only 64GB – Black

MD366ZP/A – iPad 3 Wi-Fi + 4G 16GB – Black
MD367ZP/A – iPad 3 Wi-Fi + 4G 32GB – Black
MD368ZP/A – iPad 3 Wi-Fi + 4G 64GB – Black

iPad 3 – White
MD328ZP/A – iPad 3 Wi-Fi only 16GB – White
MD329ZP/A – iPad 3 Wi-Fi only 32GB – White
MD330ZP/A – iPad 3 Wi-Fi only 64GB – White

MD369ZP/A – iPad 3 Wi-Fi + 4G 16GB – White
MD370ZP/A – iPad 3 Wi-Fi + 4G 32GB – White
MD371ZP/A – iPad 3 Wi-Fi + 4G 64GB – White


HDMI cables – dissipating the common myth

HDMI (High-Definition Multimedia Interface) is the current de-facto connectivity for most AV equipment.  In the old days, when we were still using analog component or coaxial cables, manufacturers came up with various ways to improve the cables. In the more expensive cables, you will find gold plated connectors, or EM/RF shielding on the cabling. Coupled with fancy marketing and packaging, the difference in pricing between a plain vanilla cable and a high-end cable could be 10-20 folds. But does all these optimization apply for HDMI, which utilizes digital signals?

As we all know, digital signaling uses a combination of  zeros(0) and ones (1) for transmission, so in theory the signal transmitted should either work or fail; there is no “in-between”. Analog signals uses sine-waves for transmission, so if there are external interference, it will result in image degradation (by augmenting the sine-wave in transmission).  For digital signalling, failed transmission should result in a failed pixel display (appearing like sparkles on screen). Some cables are also marketed as Ultra-High bandwidth, but in actual fact, the HDMI 1.3 (and the upcoming v1.4) specifications states that cables should only require to meet the 340MHz (10.2Gbps) bandwidth requirements. Below is a breakdown on the amount of bandwidth require that is required for uncompressed Full HD 1920×1080 video. This also takes into account for the vertical and horizontal blanking pulse to denote a new frame.

HDMI bit-rate = (horzPixels + hBlanking) x (vertPixels + vBlanking) x bitsPerPixel x frameRate x 10/8 (for TDMS encoding) x 3

Full HD 1920×1080, 60fps, 8-bit color per channel (24bit RGB) = [ (1920+280) x (1080+45) x 24-bit color x 60fps x 10/8 (extra 2-bit for TDMS enconding) x= 4.45Gbps

So in theory, any cable that meets the HDMI 1.3 specifications should be more than ample to support the bandwidth required. There is no  need for additional bandwidth at all, at least at this point.

Several tech sites had also performed testing with generic HDMI cables vs expensive Monster cables, and using specialized software to capture the transmitted output on the end display . The results are a victory for those of us who does not buy into marketing gimmicks and actually had some common sense. The output is 100 per cent identical, whether you are spending $10 or $100 on a cable.  HDMI guarantees you a pristine image – how good the image is comes down to the quality of your screen, and your perception of how it looks. People that purchase expensive cables might fall into the placebo effect, as personal perception is hardly measurable.

From my research, i would say it is safe to say that any properly manufactured cables with no loose cable or broken heads should work flawlessly for most home users that do not require HDMI cabling more than 4 meters . As cable length increases, the quality of the cabling becomes more prominent as the signal needs to travel further, and is more susceptible  to signal degradation issues. Below is a breakdown from mint.com of what i have discussed above in pictorial form.

Question is: are you going to be a douch nozzle or feed the children?

HDMI Truth

TP-Link TD-W8960N DNS problems with multiple wireless clients

I’ve recently just upgraded to the TP-Link TD-W8960N Wireless-N ADSL Gateway from my 2Wire 2700HGV-E Mio Box. When i first installed it, performance was good. The startup time was quick from first power on, taking only <60 secs to enable the wireless radio and establish DSL connection. Gone are also the random DSL line disconnection problem that i had when using the Mio box. It was very frustrating having to reboot the Mio box every time the DSL light goes “red”. It sorta just hangs. So it appears that most of my problems went away, until my mate started complaining about his W8960N having problems when more than one wireless machine is connected, particularly his iPhone.

I didn’t experience this problem myself — all the 5 devices in my house are on wireless, and they worked flawlessly. But something went wrong when i made a slight change to my router’s DNS proxy hostname, and poof — my DNS stopped working. DHCP would lease out all the correct settings, so it wasn’t a DHCP problem. I tested with the standard ping test and dig lookups:

Ping to SingNet DNS:

eddie-tans-macbook:~ eddie$ ping 165.21.83.88

PING 165.21.83.88 (165.21.83.88): 56 data bytes

64 bytes from 165.21.83.88: icmp_seq=0 ttl=55 time=10.139 ms

64 bytes from 165.21.83.88: icmp_seq=1 ttl=55 time=8.889 ms

That looked ok. DSL line appears to be working normally.

Checking DNS lookups on the router address:

eddie-tans-macbook:~ eddie$ dig @192.168.1.254 www.singtel.com
eddie-tans-macbook:~ eddie$ dig @192.168.1.254 www.singtel.com

; <<>> DiG 9.4.3-P3 <<>> @192.168.1.254 www.singtel.com

; (1 server found)

;; global options:  printcmd
;; connection timed out; no servers could be reached
Ahh.. DNS lookups were timing out.
eddie-tans-macbook:~ eddie$ dig @165.21.83.88 www.singtel.com

; <<>> DiG 9.4.3-P3 <<>> @165.21.83.88 www.singtel.com

; (1 server found)

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29837

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:

;www.singtel.com.		IN	A

;; ANSWER SECTION:

www.singtel.com.	318	IN	A	203.208.248.10

Dig @SingNet DNS resolves www.singtel.com correctly. So when i set my Mac Book’s DNS manually to include 165.21.83.88, my webpages resolves properly, but experiences problem with the default DNS leased by out the DHCP server (192.168.1.254).

So for some reason the DNS server on the router when there are multiple clients connected to it. After mucking around for a bit, i think i found the fix to the problem.

To work around this problem, make sure you have your LAN setup properly check under Advanced Setup -> LAN and “Enable DHCP Server” is checked. Fill in your start and end address (if unsure, just fill in 192.168.1.100 for Start IP Address, and 192.168.1.200 for End IP Address)

Next, go to Advanced Setup -> DNS -> DNS Server and see that “Obtain DNS info from a WAN interface:” is selected and make sure you choose your WAN interface from the dropdown list.

Lastly this is where i was stucked. Under Advanced Setup -> DNS Proxy, checked Enabled or disable DNS Proxy, under “Hostname” key in your router’s IP address, which should be 192.168.1.1 by default. (mine was 192.168.1.254). For the “Domain name of the LAN network“, you may key in any name that you fancy. Then click Save/Apply.

And viola! For some reason, this appears to work around the problem.

iPhone 3G vs iPhone 3GS

iPhone3GS

Source: apple.com

With the annoucement of the iPhone 3GS, many of us wonder what changes the new iPhone brings us. Apple released the new iPhone mainly to address one issue: performance, hence the “S” connotation for Speed. Apple claims that the new iPhone 3GS would be up to 2X faster than the iPhone3G. Physically, you can’t tell the difference between the iPhone3G and iPhone3GS, other than the badge marked on the back of the phone. In order to supply the 2X faster performance as advertised, Apple had revised the hardware with higer performance chips.

First we look at the CPU update. The original iPhone and iPhone 3G use a system on a chip (SoC) from Samsung. The SoC is a custom part and actually has Apple’s logo on the chip. The SoC houses the CPU, GPU and memory for the iPhone.

Source: Anandtech

Source: Anandtech

The CPU is based on the ARM11 core, and runs at 412MHz to save power, although the core is capable of running at 667MHz. The ARM11 CPU is a single-issue in-order microprocessor with an 8-stage integer pipeline. You can think of this core as a very high clocked, very advanced 486. And extremely low power. Under typical load, the CPU core should consume around 100mW. By comparison, the CPU in your laptop can require anywhere from 10 – 35W. Idle power is even lower.

Paired with this CPU is a PowerVR MBX-Lite GPU core. This GPU, like the CPU, is built on a 90nm process and is quite simple. The GPU does support hardware transform and lighting but it’s fully fixed function, think of it as a DirectX 6/7 class GPU (Riva TNT2/GeForce 256).

Moving on to the good stuffs..

Sources indicates that the iPhone 3GS uses (again) a Samsung SoC but this time instead of the ARM11 + MBX-Lite combo it’s got a Cortex A8 and PowerVR SGX. If the ARM11 is like a modern day 486 with a very high clock speed, the Cortex A8 is like a modern day Pentium. The A8 lengthens the integer pipeline to 13 stages, enabling its 600MHz clock speed (what I’m hearing the 3GS runs at). The Cortex A8 also widens the processor; the chip is now a two-issue in-order core, capable of fetching, decoding and executing two RISC instructions in parallel.

Show me the graphics

Now that we’re familiar with the 3GS’ CPU, it’s time to talk about the GPU: the PowerVR SGX.

Also built on a 65nm process the PowerVR SGX is a fully programmable core, much like our desktop DX8/DX9 GPUs. While the MBX only supported OpenGL ES 1.0, you get 2.0 support from the SGX. The architecture also looks much more like a modern GPU. The SGX ranges from the PowerVR SGX 520 which only has one USSE pipe to the high end SGX 543MP16 which has 64 USSE2 pipes (4 USSE2 pipes per core x 16 cores). The iPhone 3GS, I believe, uses the 520 – the lowest end of the new product offering.

In its lowest end configuration with only one USSE pipe running at 200MHz, the SGX can push through 7M triangles per second and render 250M pixels per second. That’s 7x the geometry throughput of the iPhone 3G and 2.5x the fill rate. Even if the SGX ran at half that speed, we’d still be at 3.5x the geometry performance of the iPhone 3G and a 25% increase in fill rate. Given the 65nm manufacturing process, I’d expect higher clock speeds than what was possible on the MBX-Lite. Also note that these fill rates take into account the efficiency of the SGX’s tile based rendering engine.

Features and offerings

The iPhone 3G S is available in capacities of 16GB and 32GB – both will be available in black and white. The phone also features a new 3MP camera (now capable of recording 30 fps video) on the back of the device. The iPhone 3G S also has the ability to edit videos directly on the device.

In addition, the new iPhone 3G S promises better battery life (see image to the right) despite the increased processing power. Speaking of processing power, Apple brags about 2x to 3.6x speed performance improvements over a wide range of apps.

Another new addition to the iPhone 3G S is the increase in data transfer speeds from 3.6Mbps to 7.2Mbps

Voice dialing is also coming to the iPhone 3G S – something that most other phones have already had for years. However, the voice commands also extend to other aspects of the iPhone 3GS like “previous track”, “play album” or “play songs by The Killers” within the Music app.

Other new hardware features include a built-in digital compass, Nike+ support, and hardware encryption.

As you may have already surmised, the iPhone 3G S is sporting OS 3.0 which was announced way back in March. iPhone OS 3.0 brings a wealth of new features including long-requested support for copy and paste, MMS, turn-by-turn directions, voice memo recording, Spotlight search, landscape email/notes/messaging, 3G tethering (via Bluetooth or USB), stereo Bluetooth (A2DP), peer-to-peer Bluetooth connectivity, and more. IPhone OS 3.0 will be available to download on June 17 (free for iPhone users, US$9.95 for iPod touch users).

As expected, pricing for the new 16GB and 32GB iPhone 3G S will mirror the prices of the current 8GB and 16GB iPhone 3Gs: US$199 and US$299 respectively. To make things even more interesting, Apple is also discounting the price of the iPhone 3G (8GB model) to US$99 to further expand its user base — the new price is effective today. The iPhone 3G S will be available June 17 in the US. So far, Singtel has not announced availability of the iPhone 3G S. I’m thinking it would take at least a couple of months before it hits our shores. Look out for special promos on the current iPhone 3G. I’m thinking Singtel would want to clear their exisiting stock before the new model arrives. As for Maxis, i’ve pretty much written them off as a viable candidate for anyone to get an iPhone. Their offerings are just not compelling at all.

Putting things in perspective

Combine the power of the the new hardware with the highly optimized software stack of the iPhone and you’ve got the recipe of an extremely fast iPhone. While I’ve yet to play with one, on paper, the 3GS should be every bit as fast as the videos make it seem.

The iPhone 3GS’ performance upgrades should make the phone feel a lot faster, but the real improvement will be what it enables application and game developers to do. Apple recently hired two former AMD/ATI CTOs, presumably to work on some very graphics-centric projects. The iPhone 3GS may be a mild upgrade from a consumer perspective, but what it’s going to enable is far from it; watch out Nintendo. Remember the performance gains we saw in the early days of 3D graphics on the PC? We’re about to go through all of that once more in the mobile space. Awesome.

Sources: Anandtech, Dailytech.

Configuring Virtual Hosting using Apache2 on SLES 10

Originally from: http://www.novell.com/coolsolutions/feature/19856.html

In this guide I tried to explain how to implement Virtual Hosting using Apache2 on SUSE Linux Enterprise Server 10. This guide is ESPECIALLY written for those WEB-ADMINS who are used to configuring Virtual Hosting on Redhat Enterprise Linux(RHEL 3/4). Since on a rhel Server, apache is configured using a single file i.e /etc/httpd/httpd.conf, i.e all of the virtual hosting configurations goes in /etc/httpd/httpd.conf ONLY, while in SUSE Linux Enterprise 10, we don’t edit the httpd.conf for virtual hosting.

What is Virtual Hosting:

Virtual Hosting is the art/method to run multiple websites on a single machine.

Benefits Of Virtual Hosting:

There are millions of websites on the Internet. Without Virtual Hosting it is impossible to run millions of website, because each website requires a dedicated Machine, IP and/or Port as an address to be accessed from across the world/Internet.

Types Of Virtual Hosting:

There are three types of virtual hosting.

  1. IP Based Virtual Hosting (not commonly used)
  2. Port Based Virtual Hosting (not commonly used)
  3. Name Based Virtual Hosting (commonly used)

a. IP Based Virtual Hosting:

    IP based virtual Hosting is the method to run multiple websites on a single machine, but each website must be configured to run on a different/unique IP. To configure the IP base virtual hosting we have to assign multiple IPs to the machine(server).

    Say we have a “Dell Precision 650” machine, to host 3 different websites we must assign 3 unique IP addresses to the machine, and then configure each website to listen on a dedicated IP.

    Advantage:

    Just a single physical machine will host multiple websites, otherwise we need a separate machine to host each website.

    Disadvantage:

    Requires a dedicated IP for each website.

b. Port Based Virtual Hosting:

    • To access the www.test.com, in the url user/surfer has to type the port too, as www.test.com:81
    • To access the www.wxyz.com, in the url user/surfer has to type the port too, as www.wxyz.com:82
    • To access the www.ijkl.com, in the url user/surfer has to type the port too, as www.test.com:83
  • Port base virtual Hosting is the method to run multiple websites on a single machine and even on a single/same IP, but each website must be configured to run on a different/unique Port.

    Say we have a “Dell Precision 650” machine, to host 3 different websites we just need a single dedicated/unique IP-add.

    e.g we have to host www.test.com, www.wxyz.com, and www.ijkl.comon a single machine using single/same IP-addr… we will configure www.test.comto listen on port 81, www.wxyz.comto listen on port 82, and www.ijkl.comto listen on port 83.

    Advantage:

    Just a single physical machine and IP will host multiple websites. No need to purchase multiple machines and IP-add to host multiple websites.

    Disadvantages:

    – It is quite impossible to inform the users/surfers that on which particular port the website is hosted.
    – And user/surfer must has to type the particular port in the url e.g

c. Name Based Virtual Hosting:

    To run multiple websites on a single machine and even on a single/same IP and port, we have to configure the Name-Based Virtual Hosting.

    Advantage:

    A single machine, single IP, and the default http port(80) is used to host several websites.

    Disadvantage:

    Proper DNS configuration will be required to host and access the websites hosted via Name Base Virtual Hosting.

    Note: Since other types of Virtual Hosting(IP and Port base) are not commonly used, thats why we just discuss the Name-Based virtual hosting and used the term “Virtual Hosting” for Name-Based Virtual Hosting.

Step-By-Step Configuration

Configuring Virtual-Hosting using apache2 on SLES 10

  1. First create the Directories and html files for the two websites we host using Virtual Hosting.say e.g
    a1, mkdir /srv/www/example1
    b1, echo "This is the EXAMPLE 1 website" >/srv/www/example1/index.html
    
    a2, mkdir /srv/www/example2
    b2, echo "This is the EXAMPLE 2 website" >/srv/www/example2/index.html
    ********

    After creating directories and html files for the two websites, Now we configure the apache2 to host/run the two websites using virtual hosting.

  2. in /etc/apache2/listen.conf append the following line:
    NameVirtualHost IP_OF_Server:PORT
    i.e
    
    NameVirtualHost 192.168.0.101:80
  3. then change the directory ascd /etc/apache2/vhosts.d

    cp vhost.template example1.conf
    cp vhost.template example2.conf

    NOTE: the virtual host configuration files(in our case example1.conf, and example2.conf) MUST have “.conf” in the end of their names.

  4. Have to change some required parameters as per the environment
    1. Minimal Required Configuration for example1 Websitein /etc/apache2/vhosts.d/example1.conf
      <VirtualHost 192.168.0.101:80> *
      
         ServerName www.example1.org
         DocumentRoot /srv/www/example1
      
         <Directory "/srv/www/example1"> **
            Order allow,deny
            Allow from all
         </Directory>
      
      </VirtualHost>
    2. Minimal Required Configuration for example2 Websitein /etc/apache2/vhosts.d/example2.conf
      <VirtualHost 192.168.0.101:80> 
      
         ServerName www.example2.org
         DocumentRoot /srv/www/example2
      
         <Directory "/srv/www/example2">
            Order allow,deny
            Allow from all
         </Directory>
      
      </VirtualHost>
  5. Restart Apache
    # /etc/init.d/apache2 restart
    or
    # rcapache2 restart

    Now access the websites via your favorite web-browser
    DONE 😉

* If the website is host on the default http port i.e port 80 then its optional to specify the port on rhel, but on a SLES, even the default http port(80) must have to be explicitly specify/define.

** On rhel the Directory Block( <Directory “dir_name”> …</Directory> ) declaration is optional, but on a SLES it is must required within Virtual host Configuration( <VirtualHost IP:Port>…</VirtualHost> ).

SingNet DSL Upgrade.

Upgraded my SingNet DSL line from 3M to 10Mbps. Had some teething problems with line packet drops and intermittent disconnection. But all is well after the technician came down and meddled with my phone line. Did a test on Speedtest.net and this is what i got:

OMFG!

Thinking that it might be some erroneous result due to browser, i tried with Google Chrome a second time and got this:

speedtest-google

And then Internet Explorer:

speedtest-ie

WTF?!

« Older posts Newer posts »

© 2024 eddie

Theme by Anders NorenUp ↑