azcrumpty's Site
  • Home
  • Journal
  • Search

Home Web Hosting With Opera Unite and MovableType

5/27/2011

 
I have hosted MovableType with Opera Unite and you will see, the same Document Root issues await. You will learn that link management depends upon the generation package you are using.  This install uses Ubuntu Linux.
Picture
Initialize Movable Type Normally
Install Movable Type per the guidelines and then initialize it using the Movable Type guidelines.

Picture
Configure Opera Unite
Configure Opera Unite's Computer name.  Remember to choose a name that makes the URL work with the site's content.

Picture
Opera Unite Web Proxy Path
Configure the web proxy settings ensuring the path is to your liking.  This will be the URI of the URL, /blog/ in this example.

Picture
/etc/hosts
Configure /etc/hosts with the blog aliased to localhost so Opera Unite can use a prettier name in the URL.

Picture
Movable Type Publishing Settings
Set the full site URL in Movable Type.  I used http://mt.azcrumpty.operaunite.com/blog.

Picture
Incorrect /mt-static path generation
This screen shot shows pages would be generated with /mt-static, making the URL http://mt.azcrumpty.operaunite.com/mt-static/...  Remember that the local machine's host name must come before content, so the site will look hideous.  We have to fix this in order to make it work.

Picture
Edit mt-config.cgi

Edit your mt-config.cgi file.
Configure the application to generate pages correctly. You need to ensure AdminCGIPath is a local address.  


Add your URI pathname to CGIPath.  I set it to /blog/cgi-bin/movabletype.

Add your URI pathname to StaticWebPath. I set it to /blog/cgi-bin/mt-static.

Picture
Symlink mt-static
Correct the mt-static path for external.

Picture
Correct internal fault with a symlink.

Picture
Place a meta-refresh to load /blog/ as /blog/your_blog_home.  The example is set to /blog/azcrumptys_first_blog.  The symlinks are there to make the Opera Unite Web Proxy find its static content.

Picture
Site Functional Externally
Picture
Site Root In Use by Opera Unite
All this work is due to Opera using the site root for the welcome page.  We had to shift the site and keep it aligned for internal (non Unite) and external (Unite Web Proxy) Use.

Home Web Hosting With Opera Unite and Wordpress

5/27/2011

 
I have mentioned before that Opera Unite can be used as a home based web server solution.  You can add in the reverse proxy and serve dynamic content to your friends on the Internet using the technologies of your choosing.  Here is what I did to get Wordpress to run behind Opera Unite's reverse proxy.

This How-To uses Ubuntu Linux to install and configure WordPress and Opera Unite.
Picture
For most sites, the URL identifies what the site is about.  So choose a good computer name and host name to go with your site's theme.  I choose home for the computer name and wb for the server's host name, as seen in the address field.  The default would have been localhost, which makes the URL look terrible.  Note that in the picture, the proxy is set to the document root of /var/www. Next you will want to follow the normal Wordpress install instructions only place the Wordpress install into a subdirectory named for the site host name.  The example uses /var/www/wb.

Picture
Here comes the fun part.  Remember that the address is used as the document root which ends up shifting the URL path to the right making the site root /wb/.  So, to make the internal and external link work, we will symlink Wordpress into the actual document root.  Many site packages expect to have access to the site root, but Opera Unite keeps the site root reserved for the Unite user welcome page.  This is a good feature if your site is down or your account has multiple services.  You can see I renamed Web Proxy to Wonderblog in the picture below.
All this work is due to Opera using the site root for the welcome page.  We had to shift the site and keep it aligned for internal (non Unite) and external (Unite Web Proxy) Use.

Picture
Site Root Is Reserved for Welcome Page
Picture
host file edited to include two additional host aliases
Next, we must edit the hosts file of the computer that will access the site and add two entries.  Opera will refer to the hostname of wb, while the browser we use to initialize the site will refer to the fully qualified domain name of home.azcrumpty.operaunite.com.  This design uses a second computer to manage the WordPress site and the manager's host entry is pointed to the server's IP address instead of localhost.  The fully qualified domain name, or FQDN for short, would be the server's IP address when used from the remote management computer and commented out for runtime on the local Opera Unite server.  We will not comment out the hostname of wb on the runtime platform.  I had the FQDN uncommented and performed initialization with the locally installed Opera browser.  I commented out the line once that was done but I should have used the managing compute to pre-test my ability to use that machine.  Opera Unite's web proxy doesn't run correctly if you set the FQDN to the localhost address on the proxy server.  I edited the host file of the managing client machine with the internal IP address of the server, 192.168.1.122 and that machine is the WordPress admin server.  This setup requires a separate client machine to do the work.

Picture
WordPress Initialization Page
Next, we go to the initialization page and initialize the platform with the basic settings.  If all goes well, your internal computer will access the site at /var/www/wb while the Opera Unite server will load the site from /var/www, which is set as the document root. WordPress stores URLs and paths in the database and I found moving things around a bit unfriendly.  You can initialize with the Internal URL of http://192.168.1.222/wb/, and set the external to http://yourcomputer.youraccount.operaunite.com/yourhost/.  I found that some plugins and features kept on assigning /wb/ in page generation and that caused things to break.

Picture
WordPress Admin Page
To repeat again, the machine that manages the WordPress site must be separate from the run time machine.  The one pictured here is a Macintosh with the hosts file edited so that home.azcrumpty.operaunite.com is defined as 192.168.1.222.  This is necessary because Opera doesn't allow SSL and you should not login through the Opera service as you risk password exposure.  The initialization step could have been done on the Mac, but I already had Opera open, so I used the local machine and commented out the FQDN home.azcrumpty.operaunite.com.

Picture
Wonder Blog Serving Content

Opera Unite And Apache ModRewrite or Aliases

5/27/2011

 
I will be posting shortly how to get Opera Unite  to work with WordPress and MovableType.  You might wonder why didn't I mentioning using mod_rewrite or aliasing in the articles.  The reason is because Opera Unite's web proxy comes first so rewrite and/or alias rules don't happen for content in static paths as the proxy prefers to serve that up itself.  We must accommodate the proxy's design and give it the paths it is looking for.
Picture
Site Root Is Taken
Opera reserves the site root for its own pages so paths such as /mt-static and /index.php need to be moved up one folder and all pointers to them must be corrected.

So http://yourcomputer.yourlogin.operaunite.com/ isn't available for your own web apps.  You must use the format http://yourcomputer.yourlogin.operaunite.com/yourhost/.

Studying Opera Unite as a Home Based Web Server

5/26/2011

 
I have been running Opera Unite as a Home Based Web Server for over a week now. I have learned that you can proxy and run software of your own choosing with much success and that it might just be a viable solution if you serve only a few users per day.  

Here are some observations:
  • The logs always come from the same IP running the Opera Browser
  • Images don't show up in the apache logs since the Opera Unite WebProxy chooses to serve those directly
  • Opera Unite seems to startup automatically if the browser is allowed to save the password
  • Opera Unite doesn't seem to work with The Onion Router
  • There doesn't seem to be great community support on the Opera Unite forums
  • You can't place robots.txt or sitemap.xml in the domain root since the Opera Unite Reverse proxy manages that path
Opera Unite still doesn't offer SSL.

Home Web Server with Opera Unite

5/21/2011

 
Picture
Opera Unite Web Server Content
I wrote about using a home based web server in a demilitarized zone within your home a few months ago.  This is a fun and useful task to do, but I left out a strong caution.  Your ISP may prohibit you from doing this as part of your contractual agreement.  Your ISP may even go so far as to filter out the HTTP and HTTPS, ports 80 and 443 respectively, to keep you from running your own home based web server.  So, what can you do?

You can use Opera's Unite system or a competitor home server system such as Tonido.  You should pick a system that agrees to provide the service you want so you don't have to wake up one morning finding your site isn't accessible to the world anymore.  

Picture
Opera Unite With Wordpress
You can find plenty of help with configuring Opera Unite. You can use whatever server you wanted to host your home based web server as your Opera Unite server.

I have found some things with Opera Unite that might be of interest to you.  The URLs can get really long.  Take http://home.azcrumpty.operaunite.com/webserver/content/az/Blog/Blog.html as an example.  This monster URL is configured to use Opera's web server.  The word webserver seems to identify the service I am using.  The word content can be replaced by the word activity for stats.  So two words in the URI are reserved for determining where to retrieve content from.  Finally, your content lies beneath all that in the URL and the path can get really long depending on what you do with your conten.  Opera's built in web server doesn't offer the robust configuration options of Apache or IIS so CGI, plugins, and other functions are nonexistent.

Picture
WordPress URL Needs Rewriting
Opera provides you with a reverse proxy to address your web site's complexity needs.  This gives you complete access to your web server software.  But you may find issues with URLs and need to do some URL rewriting. I found both Wordpress and MovableType hard code some paths into the HTML they generate, however, such things were fixable by Googling or hacking the code. Hard coded host names lead to content not showing up. Internal host names showing up is a general problem that has to be considered when using a reverse proxy.  It seems plenty of sites expect the document root to be available for content.  This is not the case when using Opera Unite's Reverse Proxy.  Opera adds the host name to the URL and shifts the document root over to the right by one path.  This becomes and issue with sites that have URIs that reference the document root.  For example, an image reference href="/images/foo.gif" would look like http://home.azcrumpty.operaunite.com/images/foo.gif.  This would fail since the reverse proxy needs the host name in the URL in order to get the image.  The HTML would have to have the reference as href="/wb/images/foo.gif" or be relative as href="images/foo.gif".  You must check and correct all such links for this problem if you didn't write all the HTML yourself.

Picture
Opera Unite Stats
Performance and security discussions on these services can be found online.  I didn't use performance measurement tools but I watched the images load in on the site and it felt like a dial up modem. This is probably due to the spotty performance I am getting with my ISP right now.  As far as security goes, I would NAT Opera Unite behind pfSense with rules denying access to the internal LAN or I would put the rules on the Opera Unite host itself to minimize the attack possibles should a back door be opened from the Opera browser.  You can also tell your desktop or laptop firewall software to deny all connections from your Opera Unite host. I would only push content to the Opera Unite host that I wanted shared with the world so any unauthorized access to the host would only reveal data I wanted on  the Internet.

SSH Remote Server to Server File Transfer

5/13/2011

 
Picture
SSH Server to Server File Transfer uses the Path in Red
Many people do site to site file transfers the hard way--copying and replicating data from one host to another.  The Secure Shell works very well with pipes and creating a pipeline over the network is a nice way to go. Using software pipelines will make server to server file replication much easier. We will examine copying from two servers tied together with a jump server.

You already know you can pipe output in *NIX systems:

ls -lsa | sort -n        # sort by block size

You can also start a command on one server and pipe the output to a remote server.  You can use this feature to tie two remote servers together using a common jump server.

Login and execute from the jump server:

ssh EastCoastServer "(cd /home/azcrumpty; tar -zcf - .)" | ssh WestCoastServer "(cd /home/azcrumpty; tar -zxvf -)"

This will copy my home directory specified as the dot from the east coast to the west coast.

The secret to success is creating a process pipeline across the network using SSH. The command above tells the EastCoastServer to create a subprocess within the parentheses. That process changes to my home directory and makes a compressed tarball of my home directory to standard out (STDOUT).  The output is piped to another remote SSH session that changes to the home directory and untars the compressed archive.  If you have an older *NIX where compression isn't built in to tar, add your favorite compressor (gzip/gunzip or compress/uncompress) to the pipeline.

Picture
SSH Site To Site Home Directory Replication

Execute Copy Command:
ssh EastCoastServer "(cd /home/azcrumpty; tar -cf - . | gzip -.)" | ssh WestCoastServer "(cd /home/azcrumpty; gunzip - | tar -xvf -)"

You can do a lot with pipes as well.  I could run ssh to sort output from east to west coast.



Execute List and Sort Command:
ssh EastCoastServer "ls -lsa" | ssh WestCoastServer "sort -n > east.manifest"

The diagram above shows the data is transferred along the red lines.  This diagram assumes you have firewalls between the servers and a common jump point. If not use the secure shell copy tool to move the data.

The benefits of this site to site copy method is the removal of the need to  replicate data on jump server disk risking out of space issues, because the pipe eliminates the additional step of using another disk for the data.

If you transfer large amounts of data that could take several hours, your copy operation could abort due to session termination so use a tool with persistence such as VNC or GNU Screen.

Enter your passwords as prompted.  This is much easier when you have installed trust relationships from the jump server to at least one node as you would only be prompted for one password instead of two.

Picture
SSH Server Execution Output Piped to Remote Host

Freedom Lan Using Anonymous Middle Router with Tranparent Tor

5/11/2011

 
I have seen many posts discussing providing free Wi-Fi with Tor. I did this a long time ago and I realize my external test lab uses a similar concept so I decided to show it here. This configuration is designed to require a computer with two network interfaces.  I used an old 802.11b transmitter bridged to the LAN interface to connect people to Tor.

You will essentially follow the Middle Box instructions from the Tor web site to make this work.

I used OpenBSD 4.9 for the task, but the instructions show many operating systems will work. So, after a clean install, make the torrc, pf.conf. and dhcpd.conf changes. Use static addresses or DHCP at your own discretion..  This config assumes inteface pcn0 to be the gateway and pcn1 is the dhcpd LAN and they are already configured.

Configure torrc with transparent mode settings as described in the Middle Box guide.
Configure Internal Lan as 192.168.168.55.10.
Configure dhcpd.conf to serve that LAN.
Configure rc.local to start Tor on bootup..

Many will use this for free public Wi-Fi through Tor. I use it as the basis of my Tor test network. I setup an internal interface and I have Damn Small Linux virtual machine boot up and get a DHCP assignment from the Tor middlebox. I have said before that Tor can do so much more than just be an anonymizing tool.

Picture
OpenBSD 4.9 running Tor in Transparent Proxy Mode
So, here we see the fruits of of our labor.  On bootup, Tor is running in transparent proxy mode.  This is the output you would like to see.  The daemon log will show bootstrap at 100% when it is ready to do its job.

Picture
OpenBSD with Tor in Virtual Box using Interal Lan
Here, you see the OpenBSD server uses intnet on VirtualBox.  This would be your internal physical LAN if you were using a phyiscal server.

Picture
Damn Small Linux (DSL) running in an anonymous LAN
Here is Damn Small Linux with an IP address identification service verifying we are indeed using the Tor network.  You would see the exit node change at regular intervals if you check back every 10 minutes or so.

Diesel Passenger Cars are Also Fun to Drive

5/7/2011

 
As the battle for fuel efficiency continues, an article about diesel technology will get inserted into the discussion sooner or later. I drive a 2.0L turbo diesel passenger car and the computer tells me I get around 45 MPG per tank. I like the fuel efficient nature of the diesel, but I love the low end torque even more. High torque output at low RPMs makes the car feel nicer to drive, giving the driver that big-engine feel. My last 40 MPG car had a 1.5L engine and was dreadful to drive. I had to run the RPMs up pretty high to get power out of it and I still got passed in the slow lane while trying to merge into freeway traffic. The engine noise gave me a headache, too. The power output of the diesel engine makes acceleration quiet and the sedan feels like it has six pistons powering the wheels. Why don't people just write about the driving joys you get from driving a diesel and stop worrying about fuel consumption?

Similar articles
  • Porsche Panamera Diesel delivers 6.3L/100km (37 mpg) (greencarcongress.com)
  • New Jeep Grand Cherokee Now Powered by New 3.0-liter Turbo Diesel Engine(autoandracingnews.wordpress.com)
  • New Porsche Panamera Diesel (autoandracingnews.wordpress.com)
  • Diesel cars more fuel-efficient than hybrids (news.bioscholar.com)
  • Diesel cars 'better than hybrids' for fuel efficiency (dailymail.co.uk)

    Journal

    This is the place for notes and updates.

    azcrumptyon

    Archives

    March 2013
    December 2012
    October 2012
    September 2012
    August 2012
    July 2012
    April 2012
    March 2012
    November 2011
    October 2011
    July 2011
    June 2011
    May 2011
    April 2011

    Categories

    All
    6to4
    Academic Degree
    Anonymous
    Apache
    Apache Http Server
    Automobile
    Blue
    Bridge
    Car
    Cars
    Chrome
    Chrome Os
    Chromium
    Common Gateway Interface
    Compress
    Configure
    Copy
    Dd Wrt
    DD-WRT
    Diesel
    Diesel Engine
    Directories
    Disklabel
    Disk Management
    Disks
    Distance
    Distance Education
    Distance Learning
    Dmz
    Dns
    Driving
    Eco
    Education
    Efficiency
    E-learning
    File
    Filtering
    Firewall
    Freebsd
    Fuel
    Fuel Economy In Automobiles
    Fuel Efficiency
    Green
    Gzip
    Hardware
    Hardware Virtualization
    Hitwise
    Home
    Hosting
    Howto
    Hub
    Hurricane Electric
    Hypertext Transfer Protocol
    Ibm
    Ibm Websphere
    Iis
    Importer
    Internet Service Provider
    Ip
    Ipad
    Ip Address
    Ipv4
    Ipv6
    Lan
    Lastpass
    Learning
    Linux
    Local Area Network
    Master Of Business Administration
    Microsoft
    Microsoft Windows
    Movabletype
    Movable Type
    Multitier Architecture
    Mysql
    Nat
    Network
    Network Interface Controller
    Network Time Protocol
    New York
    New York Times
    Onion
    Online
    Openbsd
    Openvpn
    Operating Systems
    Opera Unite
    Partitions
    Passenger
    Password Management
    Passwordsafe
    Paywall
    Pfsense
    Protocols
    Proxy
    Proxying And Filtering
    Publishing
    Rdns
    Reading
    Red
    Remote
    Replicate
    Reverse
    Reverse Proxy
    Router
    Samba
    Secure Shell
    Security
    Server
    Server Message Block
    Ssh
    Storage
    Tdi
    The Onion Router
    Theory And Research
    Tor
    Torque
    Transfer
    Turbo
    Turbodiesel
    Twitter
    Ubuntu
    Uniform Resource Locator
    United States
    Universal Serial Bus
    Unix
    Usb Flash Drive
    User (computing)
    Virtualbox
    Virtual Hosting
    Virtualized Dmz
    Virtual Machine
    Virtual Private Network
    Vpn
    Wan
    Web
    Web Server
    Windows
    Windows Xp
    Wordpress
    Zone

    RSS Feed

Powered by Create your own unique website with customizable templates.