Status of vhosts package


  • Netgate Administrator

    Hi All,
    Hopefully someone can help me with this.
    I am trying to install the vhosts package so I can host a few tiny webpages for my internal network only. Currently I have a ancient machine running an ancient linux flavour hosting said tiny webpages but it's rediculously inefficient in terms of power consumption to data served.
    I am running pfsense 1.2.3-release embedded.
    I have searched the forum extensively and only found people with similar problems to me.
    I have vhosts version 0.7.4. This seems to be the current version from the 7 and 8 repositories however in a forum post mcrane (the package maintainer) talks about a newer version. Is 0.7.4 the most recent?

    The problem I have is exactly as described in the above linked post.
    Installing the package seems to go smoothly, no errors. I can then setup a new vhost and the directory is created in /usr/local/vhosts. I start the service and the service starts OK as long as the information is correct in the vhost setup (need more documentation here!).
    However when I open the vhost in a browser I get 404. I.e. lighttpd is running and responding but not setup to look at the correct folder.
    Switching to https, which seems to be accomplished by simply generating the keys, and everything works fine. However the browser then starts throwing up security warnings and users start phoning me!  ::)

    It is suggested in the above linked post which I can't post to (because it's too old?) that doing a
    pkg_add -r libiconv should fix this but I just get package already installed.

    The only way to switch back from https to http seems to be to delete the keys from the setup page. Couldn't we have a check box for this?

    Initially I assumed that I could enter any IP address in the setup and it would create it 'virtually'. Not the case!

    Any help with this is much appreciated!  :)

    Steve


  • Netgate Administrator

    As an update I noticed this in my system log today:

    Oct 26 03:29:27     php: : Resyncing configuration for all packages.
    Oct 26 03:29:27     php: : The vHosts package is missing required dependencies and must be reinstalled.
    Oct 26 03:29:27     php: : The vHosts package is missing required dependencies and must be reinstalled.
    

    So it appears that the earlier suggestion of a dependency problem is probably correct.
    Any suggestions as to how I could check this?

    Steve


  • Netgate Administrator

    I'm still struggling with this.
    I have found something though.
    I can access a non ssl 'vhost' by adding the vhost name to the url.
    E.g. if I create a vhost called test on port 8181 and don't add certificates I can access it (after starting the service) on http://192.168.3.1:8181/test/index.htm.
    However if I add certificates and then restart the service it appears at https://192.168.3.1:8181/index.htm.

    This doesn't seem like the correct behavior for vhosts.

    Steve



  • Im  use beta5 jan 17 but vhosts installs but does not start, in the forum there is a few same problems but without answer :( there is a way to make it work?


  • Netgate Administrator

    Not that I know of I'm afraid. I haven't tried it on 2.0 though. I'm still stuck in the situation above. Better than nothing I suppose.  ::)

    Steve



  • I'm also struggling to get this package to work properly under 2.0 Beta5 as I was using it as my SquidGuard redirect under 1.2.3.

    The problem is a bit deceiving as there are a couple of issues with the package currently.  The first problem is that the status page fails to detect it's status properly.  See this open bug http://redmine.pfsense.org/issues/999.  However you can manually verify that it's running with the command 'ps -A | grep vhost' from a shell or Diagnostics->Command Prompt.

    The problem that I'm running into is that lighttpd is just returning error code 404.  I'm guessing that the problem is with the vhost portion of the configuration not redirecting the request to the appropriate directory.  So my current work around is to access the correct vhost files directly.
     For example: http://webfilter.example.com:8001/webfilter/index.html


  • Netgate Administrator

    That was my finding as well. You'll find that if you enable ssl it redirects to the correct directory.

    https://webfilter.example.com:8001/index.html

    Steve


Log in to reply