Jonathan Schwehm on 27 Sep 2007 23:44:33 -0000 |
Sean, I think you're close. If no one else has already suggested, try: NameVirtualHost 123.123.123.123 <VirtualHost 123.123.123.123> ServerAdmin webadmin@campusparty.com DocumentRoot /home/joe/public_html ServerName campusparty.com ErrorLog /var/log/httpd/joe_ip_Error_log CustomLog /var/log/httpd/joe_ip_Access_log combined </VirtualHost> <VirtualHost joe.campusparty.com> ServerAdmin webadmin@campusparty.com DocumentRoot /some_other_directory ServerName joe.campusparty.com ErrorLog /var/log/httpd/joe_Error_log CustomLog /var/log/httpd/joe_Access_log combined </VirtualHost> Jonathan --- Michael Bevilacqua <michael@bevilacqua.us> wrote: > Sean- > > Try not using Named Virtual Hosts for your problem. > Try using a > > <Directory /var/www/whatever> > Options Indexes > </Directory> > > before the Named Virtual Hosts line in the > httpd.conf. > > Alternatively, if that's the only IP on the box, you > could do a rewrite rule > to a directory: > > RewriteRule ^/whatever - [L] > > > Hope this helps. > > -- > Michael D. Bevilacqua > michael@bevilacqua.us > > On 9/27/07, Sean C. Sheridan <scs@campusclients.com> > wrote: > > > > Ok I'll start... > > > > > > I have a new server, running FC6 with the default > Apache install. > > > > I'm unable to do the following: > > > > Get it to respond to it's IP address differently > than it's named address. > > > > > > Ok, so it has a cname let's call it joe > > > > so joe.campusparty.com responds as expected, > apache uses the correct > > directory. > > > > but if I call it at it's ip address > 123.123.123.123 it goes to the exact > > same location. I am, however, able to get a > different response when > > calling it from the local machine. > > > > > > I add my own vhost.conf to the httpd.conf so here > it is: > > > > > > > > > > NameVirtualHost 123.123.123.123 > > > > > > > > <VirtualHost 123.123.123.123> > > ServerAdmin webadmin@campusparty.com > > DocumentRoot /home/joe/public_html > > ServerName joe.campusparty.com > > # BaseName > > ErrorLog /var/log/httpd/joe_Error_log > > CustomLog /var/log/httpd/joe_Access_log > combined > > # AllowOverride All > > </VirtualHost> > > > > > > I've tried a bunch of permutations of this: > > > > <VirtualHost _default_:*> > > DocumentRoot /var/www/html > > ErrorLog /var/log/httpd/error_log > > CustomLog /var/log/httpd/access_log combined > > </VirtualHost> > > > > > > > > What I need is for apache to use a different > directory when I call it at > > 123.123.123.123 than it uses for > joe.campusparty.com > > > > No matter what I try, it seems not to work as > expected. Can I even do > > what I am trying, or must I give the system a > name? > > > > > > Sean C. Sheridan > > scs@CampusClients.com > > > > Campus Party, Inc. > > 444 North Third St. > > Philadelphia, PA 19123 > > (215) 320-1810, xtn 117 > > (215) 320-1814 fax > > http://www.CampusClients.com > > http://www.CampusParty.com > > > > > ___________________________________________________________________________ > > Philadelphia Linux Users Group -- > > http://www.phillylinux.org > > Announcements - > > > http://lists.phillylinux.org/mailman/listinfo/plug-announce > > General Discussion -- > > http://lists.phillylinux.org/mailman/listinfo/plug > > > > ___________________________________________________________________________ > Philadelphia Linux Users Group -- > http://www.phillylinux.org > Announcements - > http://lists.phillylinux.org/mailman/listinfo/plug-announce > General Discussion -- > http://lists.phillylinux.org/mailman/listinfo/plug > ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|