Vhosts documentation, where?



  • I'm trying to set up vhosts for a low-traffic, static web site.
    I can't find documentation for the vhosts package.

    In particular: it's not clear if the web server can do virtual hosts by hostname, or if it only can run one site per IP address.
    Also, given that the web configurator runs on 443, can I run a regular site on 80 on the same IP address, or is this asking for trouble?



  • I think it can do virtual hosts names but i'm not sure. It can run on port 80 while the web configuration runs on 443.

    basically its running another lighttpd process on the box

    if you want to look at the config file, its located here /var/etc/vhosts-http.conf



  • @Cino:

    I think it can do virtual hosts names but i'm not sure. It can run on port 80 while the web configuration runs on 443.

    I assume one would have to tick the "Disable webConfigurator redirect rule" in System:Advanced:Admin Access in that case, right?



  • @rcfa:

    @Cino:

    I think it can do virtual hosts names but i'm not sure. It can run on port 80 while the web configuration runs on 443.

    I assume one would have to tick the "Disable webConfigurator redirect rule" in System:Advanced:Admin Access in that case, right?

    yes



  • As I wrote here:

    http://forum.pfsense.org/index.php/topic,50776.0.html

    I sort of got things to work, but it requires manually starting the web server. So the package needs to be fixed…



  • @rcfa:

    As I wrote here:

    http://forum.pfsense.org/index.php/topic,50776.0.html

    I sort of got things to work, but it requires manually starting the web server. So the package needs to be fixed…

    if you search the forum, this package was never updated when pfsense went to 2.x. I emailed the maintainer a while ago but haven't heard anything. You can try if you like, markjcrane@gmail.com



  • @Cino:

    if you search the forum, this package was never updated when pfsense went to 2.x. I emailed the maintainer a while ago but haven't heard anything. You can try if you like, markjcrane@gmail.com

    Isn't this also the author of the defunct freeswitch package? That would make sense, because that package required some sort of web interface, of course, and hence the two would be somewhat intertwined, and if the interest in one twindles due to the FusionPBX project…

    Still, it seems the fixes required seem to be pretty minimal, because the lighttp configuration files are written properly. What's missing is simply that the lighttpd is actually launched, and of course, the status indicator on the Dashboard isn't working, even if it's manually launched. For that, however, it seemed that there were work arounds/patches that never were committed, if I understand what's written in some of these threads correctly.



  • looks to be the same maintainer but FusionPBX.org has stated they were going to fix it a while ago.. Hasn't happen but i was able to manually install it by following their wiki.. but that's off topic.

    it is minimal from what I can tell. I've tried playing it with but i'm no coder. Since it was written for 1.2.3, some of the old code doesn't work correctly it seems for 2.x.

    You can manually start it which you figured out. I created a small script in /usr/local/etc/rc.d so it starts on boot.

    The workaround for the status doesn't work anymore. At least when I tried it, it would that its running but then 5 mins later, say its not working.

    The biggest problem with this package I think, it has to make sure it only touches this process of lighttpd and not the web-configurator for shutdown and restarts. When you restart the web-configurator from the console, it would also end my instance of lighttpd that is running.



  • @Cino:

    The biggest problem with this package I think, it has to make sure it only touches this process of lighttpd and not the web-configurator for shutdown and restarts. When you restart the web-configurator from the console, it would also end my instance of lighttpd that is running.

    Captive portal also starts a lighttpd instance, if I understand correctly, and it seems all the "working" configurations are of the pattern /var/etc/lighty-*.conf

    So I wonder if there's a script somewhere that just does a foreach command on all config files that start with lighty in /var/etc/
    If that were the case, one would only need to change the vhosts module to write the configuration to
    /var/etc/lighty-vhosts-http.conf instead of /var/etc/vhosts-http.conf

    That's pure speculation on my part, but I'd think captive portal, etc. should/would survive a restart of the webconfigurator, so there must be a script somewhere that handles all instances of lighttpd.

    If you do an
    ls /var/etc/lighty-*
    you see what I mean…



  • @Cino:

    I created a small script in /usr/local/etc/rc.d so it starts on boot.

    Is that part of the standard 2.1 distribution or package now? Because I just upgraded to the lates build, and it turns out vhosts was up without me starting it manually. Unless your change was in the latest build, it would seem that even though the process isn't launched upon package activation, it's lauched upon reboot???


Log in to reply