0

I am running Ubuntu, and an Apache server. I wanted to try out nodejs, and I wanted to run it through a virtualhost on Apache. I read this article and tried to follow the instructions: http://thatextramile.be/blog/2012/01/hosting-a-node-js-site-through-apache

I set everything up, but Apache was throwing 500 errors, which seems to be something like this situation: setting up a basic mod_proxy virtual host

I tried running this command: sudo /usr/sbin/setsebool -P httpd_can_network_connect 1

In order to get that command working, I had to install this: sudo apt-get install policycoreutils

But then when I tried the command, I get this error message:
setsebool: SELinux is disabled.

All I want to do is be able to forward requests to nodejs.mydomain.com to a nodejs daemon running on port 8000.

How do I enable setsebool, or alternatively is there another way that I can get nodejs peacefully coexisting with an Apache server running on port 80?

Josh
  • 181
  • 4
  • You are trying to alter the SELinux configuration with `setsebool`. Why do you think it’s a SELinux problem? Are there any AVC denials in the system log? If SELinux is disabled… well, it’s disabled. –  Feb 15 '13 at 14:32
  • I don't know anything about SELinux, or how to enable/disable it. I am only using this command because it was the most promising-sounding fix to the error I was getting about forwarding my requests to `localhost:8000`. The error messages in my apache error.log are similar to this one: `[Fri Feb 15 08:50:35 2013] [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.` – Josh Feb 15 '13 at 15:01
  • 1
    It’s not SELinux… –  Feb 15 '13 at 15:10

1 Answers1

1

Never mind, I solved this myself. I apparently misread mod_proxy_http as mod_proxy_html every time I looked at the article.

After enabling the proper proxy_http module, everything started working.

Stupid PEBCAK error, but I will leave the question here in case anyone else is looking to solve the original problem.

Josh
  • 181
  • 4