Running mainResponder on port 80 in the OPML Editor

Suppose you have a virgin OPML Editor installation and want to make it so that requests that come in on port 80 are handled by mainResponder. This is what you have to do.

1. user.opmlEditor.prefs.flServerOnPort80 = true

2. user.webserver.responders.mainResponderOnPort80 = @opmlServer.data.responder

3. user.inetd.config.http3 = opmlserver.data.daemon

4. user.webserver.responders.websiteframework.enabled = false

5. If you’re on a Mac:

  • user.inetd.config.http3.port = 5338
  • opmlServer.macPortForward (80, 5338)
  • opmlServer.macPortForward (5337, 5338)

Now your OPML Editor is going to take requests on port 80 and those requests are going to be handled by mainResponder.respond. However, if you want the same behavior as the websiteFramework responder you have to make one more change.

6. config.mainresponder.domains.default = @user.webserver.responders.websiteFramework.data.doctree

Now all your Tools websites will be accessible at: http://127.0.0.1/hello/ where your tool is named hello.root.

Note: I do this more for myself than anything else. I end up forgetting how I did something like this, and when I boot up a new computer with a virgin installation of the OPML Editor I’m left scratching my head how to get the server working properly. Now I can do a search to find this, and it’s easy the next time.

3 responses to this post.

  1. […] mainResponder erfolgreich mit seinem OPML Editor verbandelt und ein How-To dazu veröffentlicht: Running mainResponder on port 80 in the OPML Editor. [Ders. in der […]

    Reply

  2. Is:
    3. user.inetd.config.http3 = opmlserver.data.daemon
    supposed to be:
    3. user.inetd.config.http3.daemon = opmlserver.data.daemon
    — Should it be an address
    and
    — Should it be @opmlserver.data.daemon

    and 5. – Should these be executed as quick scripts?
    opmlServer.macPortForward (80, 5338)
    opmlServer.macPortForward (5337, 5338)
    — and do they ever have to be re-executed?

    Thanks.

    Stephen

    Reply

    • Re the first concern, I’m pretty sure it’s correct as-written.

      Re the second one, yes you should run them in the Quick Script window, or cmd-/ them in the outliner.

      I don’t believe they need to be re-executed.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: