Page 1 of 3 123 Last
  • Jump to page:
    #1
  1. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    nice read


    Thanks for the info. Now I know how people put things like "current time is: xx:xx" on their pages. Will give it a try tomorrow.
  2. #2
  3. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Good introduction


    I had some problems undestatnding how to setup vitrual hosts before. Now I don't...
  4. #3
  5. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Good article but...


    ...your headline graphic is bad
  6. #4
  7. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Logrotate and Virtual hosts


    Don't forget to modify your /etc/logrotate.d/apache file accordingly, or else your log files will keep on growing.

    - Stan
  8. #5
  9. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Problem with gotcha


    My problem is with the gocha statement, in that I have numerous things defined in my httpd.conf file - such as custom error handling - will these things be nullified if I create an entry of NameVirtualHost, and if so do I then need to demarcate them as a virtual localhost ??
    <br>

    <br>
    Thanks for the help
    <br>

    <br>
    --JohnBlaze
  10. #6
  11. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Problem with gotcha


    Unfortunately, yes the custom error handling does go somewhat down the tubes when you are using name virtual hosts. I have run into the same problems here on my systems. I am using a variant of name virtual hosting using mod_vhost. You can specify the error-docs as "External Redirects" but if you are using SSI/PHP/CGI to generate the page the majority of the variables that you need to generate the page are tossed due to the external redirect.

    I haven't spent alot of time on a workaround for it but I am sure one is possible. Especially if you start using Apatche VooDoo like mod_rewrite.

    Joe Modjeski
    system Architect
    Northlink LLC
  12. #7
  13. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Good Topic!


    About 3 months ago I started looking at the features in Apache that went beyond what this article covered. I am still somewhat in shock with all that is possible inside the httpd.conf file.

    Its just too bad for me that this article is about 3 months late for all that I have done. I think alot of Web Developers / System Administrators alike could use a refresher course on problem solving website pains within the Apache kernel rather than all the other 2 cent hacks we throw together in a pinch.

    Joe Modjeski
    System Architect
    Northlink LLC
  14. #8
  15. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    more out of apache part 1


    Nice article. I have 2 domain names and was wondering how I could do this. My question is this, The server is setup with one of the domain names now and is working fine. Do I have to remove this operating server's information before adding this same domain as a virtual host? Thanks a bunch in advance.
    Amos
  16. #9
  17. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    well written but...


    The main purpose for me reading this article was to find out how to prevent users from viewing directory listings. If someone could give me some insight on this I'd appreciate it.

    - Honky
  18. #10
  19. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: well written but...


    You will deny directory listing with the directory-setting

    <directory "c:/apache/htdocs">
    Options -Indexes
    </directory>

    or in an .htaccess- file ehich you put in the directory you dont want to be listed.

    Your Marcello
  20. #11
  21. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: more out of apache part 1-> multiple domains


    as long as the DNS side is ok then you can put any "virtual" web server on any domain you want for example:


    <!-- Code -->
    <p><pre><font color=#008000><xmp>
    <VirtualHost 209.20.3.201>
    ServerAdmin vajra@quadratic.net
    DocumentRoot /home/vajra/public_html/poperotica
    ServerName www.poperotica.com
    ErrorLog /var/log/httpd/www.poperotica.com-error_log
    CustomLog /var/log/httpd/www.poperotica.com_log combined
    </VirtualHost>

    <VirtualHost 209.20.3.201>
    ServerAdmin monkeyboy@spankme.org
    DocumentRoot /usr/local/apache/htdocs/mboy
    ServerName monkeyboy.spankme.org
    ErrorLog /var/log/httpd/monkeyboy.spankme.org-error_log
    CustomLog /var/log/httpd/monkeyboy.spankme.org_log combined
    </VirtualHost>


    <VirtualHost 209.20.3.201>
    ServerAdmin david@quadratic.net
    DocumentRoot /mp3
    ServerName mp3.quadratic.net
    ErrorLog /var/log/httpd/mp3.quadratic.net-error_log
    CustomLog /var/log/httpd/mp3.quadratic.net_log combined
    </VirtualHost>
    </xmp></font></pre><p>
    <!-- Code -->


    Neat huh? the local machine thinks that it is zeus.quadratic.net (209.20.3.201)
    (hmmm was that a shameless plug for my, currently broken, web sites? why yes it was..I really gotta setup my new machine ...)

    david thornton
  22. #12
  23. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: well written but...


    You can use -indexes in httpd.conf or in an .htaccess file to forbid it.
    <br>

    <br>
    Also, if you want to make absolutely sure that directories listings are never viewable, then recompile Apache. On the ./configure --prefix=/apache/home ... add the directive --disable-module=autoindex to the command to have Apache compiled without the ability to show directory listings.
  24. #13
  25. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: more out of apache part 1


    In section 2 of httpd.conf, you specify the configuration of the 'default web site'.

    I think you can somehow configure the default site to use host header resolution, but it might be harder than it's worth.

    What I do on multihost servers is set up the default web site to be a local-only website set to the name of the server machine itself and an IP of 127.0.0.1 (The local loopback address), then add all the name-based virtual hosts in section three.
  26. #14
  27. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Problem with gotcha


    Most of the settings defined for the default site in section 2 of httpd.conf are inherited by the virtual hosts defined in section three. Not all of them, but most.

    Check the Apache module documentation for the custom error directive and see if it is an inherited setting. I think it is, but am not sure.

    You can also override the inherited values by including the custom error handling directive inside the virtualhost section.
  28. #15
  29. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    SSL & Name-based Virtual Hosts


    You should probably point out that SSL is NOT possible with name-based virtual hosts. There is a bit of a chicken & egg paradox that makes it impossible. The web server needs to look for the host header to find out which set of web content to return. However, in an SSL connection the header information is encrypted. Before the web server can figure out which certificate to pass in the SSL handshake, it needs to know the web host information, which is not viewable until the SSL handshake is complete.

    Therefore each SSL site needs it's own IP. For non-SSL sites, name-based works great, but if you are planning on using SSL, then save yourself a headache trying to figure out why it won't work with name based hosts.
Page 1 of 3 123 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo