Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:2

Virtual Servers and Slashcode

posted by Krow on 01:23 AM June 13th, 2002   Printer-friendly   Email story
I just installed slashcode here for no apperent reason. It was a relatively easy install. Had I downloaded the slashcode itself and read the Debian readme, it would have been much easier. I now have a lot of reading to do, to figure slashcode out.

Anyway, I set it up, and it is a virtual server. But for some reason slash has taken over all my virtual servers. That is, no matter which one of my virtual servers I go to, the one slashsite shows up. I believe this question was asked here but no answers were given.

I copied the slash httpd.conf into /etc/httpd.conf and I INCLUDEd /usr/local/slash/site/, which I only modifed to move the logs. So, the entire site is in a <VirtualHost> block. Why would it take over all my other sites.

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login
Loading... please wait.
  • I had a similar issue. I'm using name-based virtual servers, not IP address, and my VirtualHost directive is set up to select the virtual server based on header name alone using the ServerName directive.

    Instead of using:


    I use:

    <VirtualHost *>

    so that my slash site is set up the same way as my other virtual names. IIRC the ServerName directive was already set in the slash include file, I just had to change the VirtualHost directive.

    YMMV, good luck!
    • I use:

      <VirtualHost *>

      Duh! I am now embarrased, ashamed, and everything else I should be.

      I setup Apache a bit ago, and forgot all about that. I missed it because I have all my virtual server's setup through a macro. I forgot that I changed it to * in the macro!

      Well, I changed, it, and now it works. Thanx!

      A couple questions though.

      1) Why is it :80. I have <VirtualHost _default_:*> so I figure that gets everything. I don't have

      • There aren't any questions about how your apache is configured, it just generates a file that can be used on a server that's dedicated to slash. If slash isn't the only web app or if you want it in a non-root path, you need to do a little manual tweaking. I thought of the config files it generates as a template for me to tweak to fit my own needs. A little more smarts in the script would be nice to generate a template that needs less or no tweaking, but I still wouldn't trust it without going over it by hand. :)
  • Slash is really setup to be the only thing using mod_perl on a box. What I had to do was take the innerds of /usr/local/slash/httpd/slash.conf and remove it (except for the include line).

    I think at the top of the file it says something like "this is all the mod perl specific stuff".

    Then take all that, and put it inside the virtualhost tags for every slash site in each site's config file.

    I'm not sure how this affects the memory footprint of slash. But it worked on one of my servers.

    Try it, and if this so
    lottadot []
    • Then take all that, and put it inside the virtualhost tags for every slash site in each site's config file.

      Well, only one server is using slashcode. It is also the only server using perl. But I will keep this in mind in case I have problems in the future. Thanx for the advice.
    • All you need to do is to move the mod_perl handler into the virtual host and that will keep you out of trouble as far as having mod_perl in other virtual hosts.

      You can't grep a dead tree.
  • I have had simular problems before when I forgot to use the NameVirtualHost directive. Without it, I believe apache assumes you are using IP based virtual hosts, so if you have two virtual hosts configured, it uses the first one that matches the IP. However, if you throw in a NameVirtualHost it then knows to use the hostname in the http exchange to determine the virtualhost to use.

    Here's how my site is set up:




    I have also read that one may use * in every place i used an ip:port above to tell apache to bind these to every ip and port it listens to.
    • Thanx. I could have used this hint when setting up Apache itself a while back! I read the documentation on Apache's website, and finally got the NameVirtualHost to work.

      It was * that I needed. I don't care to much for IP addresses, since they may change (I'm on a cable connection, but so far my dynamic ip has been static).